本文介绍了使用GitHub GUI进行COMMIT& SYNC并且一切都消失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在GitHubGUI中,像往常一样,我做了我的更改,然后单击 Commit&同步,一会儿弹出Merge Conflics对话框,消失了,我同步了远程回购的最新变化。



我所做的一切都消失了。

在我尝试修复合并错误后,我继续单击 commit& sync 之后,发生了这种情况,但这次从字面上看,一切都消失了,就像我刚刚做了一个 pull 命令,而git不会抓住我的提交。

有什么方法可以恢复这些提交的文件吗? GUI首先提交它们,然后推送它们。所以我认为它必须去某个地方哈哈。

编辑:

Did:

  git reflog show 
ae0217a HEAD @ {1}:rebase finished:返回refs / heads / master
ae0217a HEAD @ {2}:checkout:从master到...(已编辑的字母)
2729389 HEAD @ {3}:commit:第一面菜单更改:更改大小,颜色和添加的图标
2bf6181 HEAD @ {4}:pull:快速-forward

所以 commit 是在 HEAD @ {3} 上,但我该如何回到它,或者我的更改出现在 master


解决方案

必须这样做:

git reset --hard HEAD {3 }



返回到我的提交消失。




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

这篇关于使用GitHub GUI进行COMMIT& SYNC并且一切都消失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 14:58