Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,63 @@ Now submit the pull request.
<img style="float: right;" src="images/compare.png" alt="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.

### 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.