命令“git checkout”的含义。 [英] meaning of the command "git checkout ."

查看:154
本文介绍了命令“git checkout”的含义。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我明白标题中的命令类似于撤销对当前存储库的更改,但我无法理解它的实际工作方式或读取命令的方式。任何线索都是非常有帮助的。

解决方案


git checkout with < ;路径> [...]用于从索引中恢复修改的或
删除的路径到它们的原始内容,或者用命名的内容替换
路径a
commit-ish)。

请参阅 documentation ,特别是此处此处在您的案例中被当作< pathspec> 来处理当前目录。当前 HEAD 修订了给定< pathspec> 中的所有文件,因此在您的情况下,基本目录中的所有内容,已经签出。


While I understand that the command in the title is akin to undo the changes to the current repository, I am unable to understand how it actually works or how to read the command. Any leads would be a great help.

解决方案

git checkout with <paths> [...] is used to restore modified or deleted paths to their original contents from the index or replace paths with the contents from a named (most often a commit-ish).

See documentation, especially here and here: . is treated as <pathspec> in your case, adressing the current directory. The current HEAD revision of all files in the given <pathspec>, so in your case everything in your base directory, are checked out.

这篇关于命令“git checkout”的含义。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆