Skip to content

Instantly share code, notes, and snippets.

@rogerramosme
Forked from niqdev/rename-branch-github.txt
Created March 29, 2018 21:58
Show Gist options
  • Save rogerramosme/e38078ae8c8c086e5bdeb1f041d13660 to your computer and use it in GitHub Desktop.
Save rogerramosme/e38078ae8c8c086e5bdeb1f041d13660 to your computer and use it in GitHub Desktop.

Revisions

  1. @niqdev niqdev revised this gist Feb 12, 2018. No changes.
  2. @niqdev niqdev revised this gist Feb 12, 2018. No changes.
  3. @niqdev niqdev renamed this gist Sep 16, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. @niqdev niqdev created this gist Sep 16, 2015.
    3 changes: 3 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    git branch -m old_branch new_branch # Rename branch locally
    git push origin :old_branch # Delete the old branch
    git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote