Skip to content

Instantly share code, notes, and snippets.

@vfalconi
Created January 27, 2015 22:19
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 vfalconi/e296a32e0826eac7acbf to your computer and use it in GitHub Desktop.
Save vfalconi/e296a32e0826eac7acbf to your computer and use it in GitHub Desktop.
Thanks to my Git client's UI, I sometimes check the "Push changes immediately to..." option by mistake. These three commands will undo the damage and let you rebase in peace. Source: http://stackoverflow.com/questions/3046436/how-do-you-stop-tracking-a-remote-branch-in-git

git branch -d -r origin/<branch-name>

git config --unset branch.<branch-name>.remote

git config --unset branch.<branch-name>.merge

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