Reputation: 619
i'm new to phpstorm I've deleted master branch on my local phpstorm. How can i recreate it on phpstorm
Upvotes: 0
Views: 570
Reputation: 3737
It depends how you deleted it and what have you done afterwards...
But the easiest and safest is to:
Use git reflog
to find last commit of master branch.
Use git checkout HEAD@{X}
to go to that last commit. If you haven't done anything after deleting it, X is 1.
Use git checkout -b master
to create a master branch on that commit.
Optionally you want to set up tracking if you're using a remote repository (e.g. origin):
git branch --track master origin/master
Upvotes: 1