Skip to content

Instantly share code, notes, and snippets.

@awgv
Last active May 5, 2017 23:26
Show Gist options
  • Save awgv/de312a1f18bc5ad7e8afb5e4afadd17b to your computer and use it in GitHub Desktop.
Save awgv/de312a1f18bc5ad7e8afb5e4afadd17b to your computer and use it in GitHub Desktop.
@sstok on updating forks
```
git fetch upstream
git checkout remote_branch
git reset --hard upstream/remote_branch
git checkout working_branch
git reset --hard upstream/remote_branch
git cherry-pick commit // The one that you need to keep.
git push -f origin local_branch:local_branch
```
This should do the trick 👍 always prefer to rebase when puling instead of merging as creates ugly merge bubbles.
@awgv
Copy link
Author

awgv commented May 5, 2017

Rebase can be done this way:

git fetch upstream
git rebase upstream/master

Or this way:

git remote add upstream [git-url]
git checkout master
git pull --rebase master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment