Skip to content

Instantly share code, notes, and snippets.

@ihorzenich
Last active November 26, 2019 09:18
Show Gist options
  • Save ihorzenich/b1a2bf3d74b91280ac86ef01275ccb85 to your computer and use it in GitHub Desktop.
Save ihorzenich/b1a2bf3d74b91280ac86ef01275ccb85 to your computer and use it in GitHub Desktop.
Update branch to master

Current branch will be updated to master, and then all new commits in it will be moved to head.

Not pushed

git fetch
git rebase origin/master

Pushed

git checkout master
git pull
git checkout branchname
git rebase master

git status
git add
git rebase --continue
git push origin branchname --force-with-lease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment