Skip to main content
The 2024 Developer Survey results are live! See the results
15 of 16
Added command to remove temp branch
Sudhanshu Mishra
  • 6.7k
  • 2
  • 62
  • 77

Just do this:

git checkout master

Or, if you have changes that you want to keep, do this:

git checkout -b temp
git checkout -B master temp

Eventually, remove the temp branch (if you created one):

git branch -d temp
Daniel Alexiuc
  • 13.2k
  • 9
  • 59
  • 73