Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My project went south, so I created a branch called F*****UP. Now that is the good branch, so I would like to back up Master, and make F*****UP the master branch again. How to I do this on the Git command line? Git for Windows that is.
Posted
Comments
Thomas Daniels 20-Sep-14 12:58pm    
Do you want to merge the branches, or do you want to make the current master branch another branch and make F*****UP the new master branch?
Brady Kelly 20-Sep-14 13:08pm    
I don't want to merge. I want to make F****UP the master again, and make the current master another branch.
Sergey Alexandrovich Kryukov 20-Sep-14 13:03pm    
I guess, some systems can be offended by foul language; try to avoid it. :-)
—SA
Brady Kelly 20-Sep-14 13:09pm    
I'm working with SQLCE in VB.NET. The language you see here is mild.
Sergey Alexandrovich Kryukov 20-Sep-14 13:32pm    
:-)
We had such a joke in the past:

The book "Software Development for Microsoft Windows" was published with the classifier "NC-17" or "17+". Why? "Strong language". :-)

—SA

1 solution

You can rename branches using git branch -m oldname newname (or just git branch -m newname if you want to rename the current branch). You can do that here too:
git branch -m master oldmaster
git branch -m F*****UP master

Note that if you want to push upstream now, you'll have to force push (by adding the -f argument to git push).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900