Skip to content

Instantly share code, notes, and snippets.

@blikenoother
Created June 25, 2015 08:43
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 blikenoother/fe8a3825d587d3d14e17 to your computer and use it in GitHub Desktop.
Save blikenoother/fe8a3825d587d3d14e17 to your computer and use it in GitHub Desktop.
Fork the repo and clone
1. List the current configured remote repository for your fork: git remote -v
2. Specify a new remote upstream repository that will be synced with the fork: git remote add upstream git@github.com:[ORIGINAL_OWNER]/[REPO_NAME].git
3. Verify the new upstream repository you haveve specified for your fork: git remote -v
# origin git@github.com/YOUR_USERNAME/REPO_NAME.git (fetch)
# origin git@github.com/YOUR_USERNAME/REPO_NAME.git (push)
# upstream git@github.com/ORIGINAL_OWNER/REPO_NAME.git (fetch)
# upstream git@github.com/ORIGINAL_OWNER/REPO_NAME.git (push)
Syncing a fork
1. Fetch the branches and their respective commits from the upstream repository: git fetch upstream
2. Check out your local master branch: git checkout master
3. Merge the changes from 'upstream/master' into your local 'master' branch. This brings your master branch into sync with the upstream repository, without losing your local changes: git merge upstream/master
Create pull requirest from github UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment