[英]git checkout revision of a file in git gui
Is there a good way to checkout revisions of a specific file in git gui like an add tool or something? 有没有一种很好的方法来检查git gui中特定文件的修订,就像添加工具一样?
Tried adding a new tool as: 尝试添加一个新工具:
git checkout $REVISION $FILENAME
But it only allows branch revisions out, not a specific commit. 但它只允许分支修订,而不是特定的提交。 Is there a particular var I coud use to do that? 是否有一个特定的变量用于做那个?
You could try: 你可以尝试:
$ git show $REVISION:$FILENAME
with a ':' syntax as described in git rev-parse
. 使用git rev-parse
描述的':'语法。
That would be if you can specify for $FILENAME
the full path relative to the top directory of your project (the directory including the .git
directory). 如果您可以为$FILENAME
指定相对于项目顶级目录的完整路径(包含.git
目录的目录)。
This should be equivalent to: 这相当于:
$ git checkout $REVISION -- $FILENAME
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.