So in the GitHubGUI, as usual, I did my changes and then clicked Commit&Sync
and for a brief moment the "Merge Conflics" dialog popped up and then everything disappeared and I synced the newest changes with the remote repo.
Everything I did disappeared.
This has happened before after I kept clicking commit&sync
after merge errors I tried to fix, but this time literally everything just disappeared like I would have just done a pull
command and git wouldn't catch my commit.
Is there some way I can recover these files that were committed? The GUI commits them first and then pushes them. So I figure it had to go somewhere lol.
Edit:
Did:
git reflog show
ae0217a HEAD@{1}: rebase finished: returning to refs/heads/master
ae0217a HEAD@{2}: checkout: moving from master to a....(edited letters)
2729389 HEAD@{3}: commit: First side menu change : changed size, colors, and added icons
2bf6181 HEAD@{4}: pull: Fast-forward
So the "commit
" is on HEAD@{3}
but how do I get back to it or have my changes appear on master
?
Had to do:
git reset --hard HEAD{3}
to return to my commit that "disappeared."
https://www.kernel.org/pub/software/scm/git/docs/git-reset.html
来源:https://stackoverflow.com/questions/15773716/used-github-gui-to-commitsync-and-everything-disappeared