git
› Pro Git
› Atlassian Git Tutorial
› Pro Git 简体中文翻译
› GitX
williamx
V2EX  ›  git

Use '--' to separate filenames from revisions 如何翻译?

  •  
  •   williamx · Apr 9, 2016 · 3786 views
    This topic created in 3889 days ago, the information mentioned may be changed or developed.
    使用 git reset HEAD path/to/file 的时候出现这个错误。 Google 了一下,大意是说没分清操作的是 branch 还是 file ,所以操作文件的正确命令是`git reset -- path/to/file`。
    但是上面那个提示是什么意思? revisions 在这里该怎么理解?
    3 replies  •  2016-04-10 09:13:36 +08:00
    qq529633582
    qq529633582
    Apr 9, 2016❤️1
    1
    "用`--`分割文件名和版本号"

    "--"之前是可以指定一个版本(如 commit 、 branch 等)的,如`git reset a1b2c3d -- path/to/file`,你这里没有指定就用 HEAD 咯
    mcfog
    mcfog
    Apr 10, 2016
    2
    revision n.修订

    “修订”是版本库中记录的一组修改/一个状态,每提交一次就会产生一个 revision

    对 git 来说, commit hash 、 branch 、 tag 以及 HEAD 等都可以用来指代一个 revision
    williamx
    williamx
    OP
    Apr 10, 2016
    3
    感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   929 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:19 · PVG 04:19 · LAX 12:19 · JFK 15:19
    ♥ Do have faith in what you're doing.