AI Hints
Home›Git & GitHub Tutorial›Project: Open Source
Git & GitHub · Lesson 129 of 144

Project: After the Merge

Syncing your fork.

⏱ 2 min read▶ Video at 2:20:42🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

Good news. The maintainer approved and merged your pull request. You're officially an open source contributor! Now let's tidy up, and sync your fork, ready for the next contribution.

Project: After the Merge
From the video: Project: After the Merge
  • Your pull request was merged
  • You're a contributor!
  • Tidy up and sync

Sync and tidy

Switch to main. Fetch upstream, and merge upstream slash main, which now includes our fix. Push, so our fork on GitHub matches too. Then delete the fix typo branch, locally and on our fork.

git
git switch main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
git fetch upstream
From https://github.com/octo/awesome-tips
 * [new branch]      main       -> upstream/main
git merge upstream/main
Updating f23563f..7c0f322
Fast-forward
 tips.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
git push
To https://github.com/sam/awesome-tips.git
   f23563f..7c0f322  main -> main
git branch -d fix-typo
Deleted branch fix-typo (was 7c0f322).
git push origin --delete fix-typo
To https://github.com/sam/awesome-tips.git
 - [deleted]         fix-typo

Keep contributing

Every contribution teaches you something about real projects. Look for more good first issues. Improve documentation. Answer questions in issues. And list your merged pull requests on your CV. They're real proof that you can work with a team.

More issuesgood first issue
Docsalways welcome
Help othersanswer questions
Your CVreal proof of teamwork

Summary

Fetch and merge upstream, push to your fork, and delete the branch. You're ready for the next contribution. Next, handling an urgent bug in a released version.

Key takeaways
  • Merge upstream/main
  • Push to your fork
  • Delete the branch
Next up: Project: An Urgent Fix — a hotfix for v1.0