git 如何在 GitKraken 中签出提交?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39977015/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to checkout commit in GitKraken?
提问by Black
It seems to be impossible to checkout commits with GitKraken.
使用 GitKraken 检查提交似乎是不可能的。
As you can see there is no option to checkout older commits, only Cherrypick commit
but I don't know what this is good for.
如您所见,没有选项可以检出较旧的提交,Cherrypick commit
但我不知道这有什么好处。
EDIT: I was able to checkout with another git program (git bash) via console:
编辑:我能够通过控制台使用另一个 git 程序(git bash)结帐:
Now it looks like this in GitKraken:
现在在 GitKraken 中看起来像这样:
回答by poke
GitKraken (as of version 1.7) does not seem to offer a way to get into a detached HEAD mode, and check out a commit directly. Similarly, it will also not allow you to check out a tag (since that would also give you a detached HEAD).
GitKraken(从 1.7 版开始)似乎没有提供进入分离 HEAD 模式并直接检查提交的方法。同样,它也不允许您签出标签(因为这也会给您一个分离的 HEAD)。
So instead, you will have to create a (temporary) branch first which you can then check out.
因此,您必须先创建一个(临时)分支,然后才能签出。
回答by DharmaTurtle
回答by Carlos Pereira
You can make a UNDO in the top bar. Anothe option can be reset to another commit using the right click on the commit.
您可以在顶部栏中进行 UNDO。可以使用右键单击提交将另一个选项重置为另一个提交。
回答by skelom
The way you do this is by right clicking on your desired commit and select "Reset to this commit" and then choose "Hard - Discard all changes"
执行此操作的方法是右键单击所需的提交并选择“重置为此提交”,然后选择“硬 - 放弃所有更改”