DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Sync a Fork on Gibhub


I've forked a github repo "https://github.com/tom/project1.git". Several days later there are some new commits on this repo. How to sync these commits into my forked repo?

cd <repo-home>
git remote -v  # verify if the upstream repo will be added
git remote add upstream  https://github.com/tom/project1.git
git remote -v
git checkout master
git fetch upstream   # if use pull instead of fetch, merge is needed as well
git merge upstream/master
git push origin

Ref: Syncing a fork



Published

Aug 21, 2016

Last Updated

Aug 21, 2016

Category

Tech

Tags

  • fork 1
  • github 6
  • repository 3
  • sync 6

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor