本文介绍了Git结帐:“@ { - N}”句法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是什么意思? / p>

解决方案

这就是说,如果你这样做的话:

  git checkout @ { -  1} 

你会看看你的分支在当前分支之前,您已经签出。另外,它通过名称​​检查它,所以你实际上将该分支放在上,而不仅仅是检查在分离HEAD状态下的提交。同样,您可以使用 git checkout @ { - 2} 返回前两个分支更改,等等。


I found this section in the git manpage, but it's kind of an obfuscated explaination:

What does it mean?

解决方案

It's saying that if you do:

git checkout @{-1}

You'll check out the branch you were on before the current branch you have checked out. In addition, it checks it out by name, so you'll actually be on that branch, rather than just checking out that commit in a detached HEAD state. Similarly, you could use git checkout @{-2} to go back "two branch changes ago", and so forth.

这篇关于Git结帐:“@ { - N}”句法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 04:54