zoukankan      html  css  js  c++  java
  • 将文件移出版本控制 (Revision Control)

    两条重要的 Git 命令:
    git rm -r -n --cached /path/to/the/directory

    git rm -r --cached /path/to/the/directory


    The git rm command removes files from the index, or from the working tree and the index. git rm will not remove a file from just your working directory. (There is no option to remove a file only from just your working tree and yet keep it in the index; use /bin/rm if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the -f option. When --cached is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index.

    -n, --dry-run
    Don’t actually remove any file(s). Instead, just show if they exist
    in the index and would otherwise be removed by the command.

    (excerpted from the man page of git-rm.)

  • 相关阅读:
    Alpha冲刺第一天
    团队项目-需求分析
    设计模式第二次作业
    设计模式第一次作业
    冲刺合集
    冲刺NO.12
    项目测试
    冲刺NO.11
    冲刺NO.9
    冲刺NO.10
  • 原文地址:https://www.cnblogs.com/Patt/p/6193546.html
Copyright © 2011-2022 走看看