Skip to content

Instantly share code, notes, and snippets.

@josejuansanchez
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josejuansanchez/434ec964f975cb8fbb4c to your computer and use it in GitHub Desktop.
Save josejuansanchez/434ec964f975cb8fbb4c to your computer and use it in GitHub Desktop.
Syncing a p2psp fork

Configuring a remote for a fork

  1. List the current configured remote repository for your fork.
git remote -v
  1. Specify a new remote upstream repository that will be synced with the fork.
git remote add upstream https://github.com/P2PSP/p2psp.git
  1. Verify the new upstream repository you've specified for your fork.
git remote -v

Syncing a fork

  1. Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.
git fetch upstream
  1. Check out your fork's local master branch.
git checkout master

Or

git checkout -b gui origin/gui
  1. Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
git merge upstream/master

Or

git merge upstream/gui

Reference: https://help.github.com/articles/syncing-a-fork/

Push a new local branch to a remote repository

git push -u origin gui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment