Skip to content

Home

Update remote branch after rewriting history

Forces an update of the remote branch after rewriting the history locally.

git push -f

# Examples
git checkout patch-1
git pull
git rebase master
# Local `patch-1` branch has been rebased onto `master`, thus diverging
# from the remote `patch-1` branch

git push -f # Force update the remote `patch-1` branch

More like this

Start typing a keyphrase to see matching snippets.