dheerajn.github.io (contains besafe.json)Plainly (privacy page at /Plainly/privacy/)After migration:
dheerajn.github.io → Your new personal websitedheerajn.github.io/Plainly/privacy/ → Still works! (separate repo, untouched)besafe.json → Preserved in new siteYour app’s privacy page will NOT break - it’s hosted from a different repository.
This replaces the repository completely while preserving the history.
1
2
3
4
5
6
7
8
9
10
11
12
# 1. Navigate to your new site
cd ~/Desktop/dheerajn.github.io
# 2. Connect to your existing GitHub repository
git remote add origin https://github.com/dheerajn/dheerajn.github.io.git
# 3. Fetch existing repo (to preserve any history)
git fetch origin
# 4. Force push your new content
# This replaces everything but keeps the repository
git push -u origin main --force
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 1. Clone your existing repo
cd ~/Desktop
git clone https://github.com/dheerajn/dheerajn.github.io.git dheerajn-existing
# 2. Remove old content (keep .git folder)
cd dheerajn-existing
rm -rf * .* # Don't worry, .git is hidden and won't be deleted
ls -la # You should see .git directory
# 3. Copy new site content
cp -r ~/Desktop/dheerajn.github.io/* .
cp ~/Desktop/dheerajn.github.io/.gitignore .
cp ~/Desktop/dheerajn.github.io/.github .
# 4. Commit and push
git add .
git commit -m "Replace with new personal website"
git push
After pushing, check:
If the site doesn’t deploy automatically:
If something goes wrong, you have a backup:
1
2
3
4
5
6
# Your old site is backed up at:
cd ~/Desktop/dheerajn.github.io-backup
# To restore it:
cd ~/Desktop/dheerajn.github.io-backup
git push origin main --force
_data/social.yml with your LinkedIn/Twitterpages/about.md with your bioassets/images/profile.jpg_posts/_til/_projects/Q: Will my app’s privacy page break?
A: No! It’s in a separate repository (Plainly), so it’s completely independent.
Q: What happens to besafe.json?
A: It’s preserved in the new site at /besafe.json.
Q: Can I undo this?
A: Yes! You have a backup at ~/Desktop/dheerajn.github.io-backup/
Q: How long does deployment take? A: Usually 2-3 minutes after pushing to GitHub.
Q: Do I need to update my app? A: No! The privacy page URL stays exactly the same.
I recommend Option 1 (Clean Migration) - it’s simpler and faster.
Just run those 4 commands and your new site will be live!
Need help? Let me know if anything doesn’t work as expected.