my inner geek

When developing stuff, configuring systems, or simply working with computers, I come across obstacles that can be solved easily once you know the solution. But finding the solution can take ages. In this blog, I am collecting the solutions for some of the technical problems that I encounter.

Thursday, August 25, 2016

Renaming branches in git

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

(source)
Posted by Michael at 7:42 AM No comments:
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

My photo
Michael
View my complete profile

Blog Archive

  • ►  2025 (1)
    • ►  March (1)
  • ►  2023 (1)
    • ►  December (1)
  • ►  2022 (4)
    • ►  December (1)
    • ►  June (2)
    • ►  January (1)
  • ►  2021 (1)
    • ►  November (1)
  • ►  2018 (2)
    • ►  November (1)
    • ►  September (1)
  • ▼  2016 (5)
    • ▼  August (1)
      • Renaming branches in git
    • ►  June (2)
    • ►  May (1)
    • ►  March (1)
  • ►  2015 (4)
    • ►  December (1)
    • ►  August (1)
    • ►  June (1)
    • ►  April (1)
  • ►  2014 (2)
    • ►  September (1)
    • ►  August (1)
  • ►  2013 (3)
    • ►  October (1)
    • ►  July (1)
    • ►  April (1)
  • ►  2011 (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2010 (6)
    • ►  December (1)
    • ►  November (1)
    • ►  October (2)
    • ►  June (1)
    • ►  March (1)
Picture Window theme. Powered by Blogger.