From 10fa011158dda532951c09e2e4fc77144d61b241 Mon Sep 17 00:00:00 2001 From: SUHAN RAMANI Date: Fri, 5 Dec 2025 23:30:04 +0530 Subject: [PATCH 1/2] Add instructions for syncing fork with original repo Added instructions for keeping a fork up to date with the original repository. --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 0ace033..dcda804 100644 --- a/README.md +++ b/README.md @@ -99,3 +99,28 @@ Now submit the pull request. submit pull request Soon I'll be merging all your changes into the master branch of this project. You will get a notification email once the changes have been merged. + +## Keeping Your Fork Up to Date with the Original Repository + +After you fork this repository, the original project may receive new updates. To keep your fork updated with those changes, follow these steps: + +### Option 1: Sync Using GitHub (Without Command Line) + +1. Go to your forked repository on GitHub. +2. Click on the **"Sync fork"** button (if available). +3. Click **"Update branch"** to pull the latest changes from the original repository. + +### Option 2: Sync Using the Compare Feature + +1. Go to your forked repository on GitHub. +2. Click on **"Compare"**. +3. Make sure: + - **Base repository** = Original repository + - **Head repository** = Your fork +4. Create a Pull Request from the original repo to your fork. +5. Merge that Pull Request into your fork to update it. + +> ⚠️ Note: Sometimes the base and head repositories appear **reversed** in the Compare dropdown by default. Always make sure the **original repository is the base** and **your fork is the head** before creating the Pull Request. + +This helps you keep your fork up to date with the latest changes so you can continue contributing without conflicts. + From 9f0f59d9338f35f6bfaea52e015c79f673676743 Mon Sep 17 00:00:00 2001 From: SUHAN RAMANI Date: Sat, 6 Dec 2025 00:29:24 +0530 Subject: [PATCH 2/2] Add command line sync instructions for forks Added instructions for syncing a fork using the command line. --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dcda804..f1e7b69 100644 --- a/README.md +++ b/README.md @@ -122,5 +122,40 @@ After you fork this repository, the original project may receive new updates. To > ⚠️ Note: Sometimes the base and head repositories appear **reversed** in the Compare dropdown by default. Always make sure the **original repository is the base** and **your fork is the head** before creating the Pull Request. -This helps you keep your fork up to date with the latest changes so you can continue contributing without conflicts. +### Option 3: Sync Using the Command Line + +To update your fork using the command line,follow these steps: + +1. Check existing remotes +```bash +git remote -v +``` +2. Add the original repo as upstream (do this only once) +``` +git remote add upstream https://github.com/ORIGINAL_OWNER/REPO_NAME.git +``` +3. Fetch latest changes from original repo +``` +git fetch upstream +``` +4. Switch to main branch (or master) +``` +git checkout main +``` +5. Merge original repo changes into your branch +``` +git merge upstream/main +``` + + 6. Push updated code to your fork on GitHub +``` +git push origin main +``` + +🔁 If your default branch is `master` instead of `main`, replace: + +`main` → `master` +`upstream/main` → `upstream/master` + +This will keep your fork in sync with the original repository so you can continue contributing without conflicts.