githubteacher / flaming-octo-meme

demo repo for today's Intermediate class
0 stars 5 forks source link

What happens if I "git branch -d master"? #148

Open GeorgeFabian opened 9 years ago

GeorgeFabian commented 9 years ago

Is it undo-able?

githubstudent commented 9 years ago

I'm not sure why you would do it :wink: but you can't delete a branch while you are checked out to a branch so you would essentially have to create a branch off of master in order to delete master, in which case the history still lives on the branch you are checked out to. So you could rename that branch master and then you will be back at the beginning again!