Created
August 22, 2015 21:55
-
-
Save cmatskas/c1a0bf77be83a681d7f2 to your computer and use it in GitHub Desktop.
Git merge detached head
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$git checkout –b temp #makes a new branch from current detached HEAD | |
$git branch –f master temp #update master to point to the new <temp> branch | |
$git branch –d temp #delete the <temp> branch | |
$git push origin master #push the re-established history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And one more ;-) Probably you need to do
git branch --unset-upstream
and thengit push --set-upstream origin master