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

git status 里面有几个已删除文件的记录,怎么能将它们从 git status 里面清除呢

  •  
  •   tedd · Jul 27, 2014 · 5105 views
    This topic created in 4494 days ago, the information mentioned may be changed or developed.
    之前删除了几个vim的缓存文件,现在通过git status可以看到这几个文件名的记录,每次git add . -> git push后这些记录还在,请问怎么才能将它们从git status中去掉呢
    3 replies  •  2014-07-28 09:09:13 +08:00
    virusdefender
    virusdefender
    Jul 27, 2014❤️1
    1
    git rm ***
    aa65535
    aa65535
    Jul 27, 2014❤️1
    2
    使用 git rm 再删一次, git add . 后 git commit 提交
    直接 git commit -am "delete files" 提交
    使用 git add -all , 然后 git commit 提交

    以上三种都可以。
    yangg
    yangg
    Jul 28, 2014
    3
    lz 要的是 `git rm --cached path/to/filename` ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1077 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:53 · PVG 01:53 · LAX 09:53 · JFK 12:53
    ♥ Do have faith in what you're doing.