Created
August 20, 2010 14:35
-
-
Save chrislerum/540444 to your computer and use it in GitHub Desktop.
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
usually i don't work on local master branch | |
this time i did my mistake | |
got 4 commits ahead of origin/master | |
to fix, did this: | |
git checkout working | |
git checkout master | |
git reset --hard origin/master | |
i expected that to do the same thing as git reset --hard head^^^^ (go back 4 commits) | |
what i got was my new 'working' branch disappeared (why?) | |
git reflog: | |
2382623 HEAD@{0}: origin/master: updating HEAD | |
7bda753 HEAD@{1}: checkout: moving from master to master | |
7bda753 HEAD@{2}: commit: change issues label | |
f1c8a6b HEAD@{3}: commit: change tabs to spaces | |
d453d08 HEAD@{4}: commit: edit feature text | |
b67f114 HEAD@{5}: commit: updated sample db.yml | |
how can i get back my lost 4 commits? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment