cloudsthere
V2EX  ›  问与答

git 取消文件追踪而不删除远程文件

  •  
  •   cloudsthere · Jun 24, 2017 · 3057 views
    This topic created in 3274 days ago, the information mentioned may be changed or developed.

    文件 doc 已被追踪并被推送到远程仓库,同时同步到协作者乙的本地仓库,甲在本地执行操作:

    git rm --cached doc
    git add .
    git commit -m '取消对 doc 追踪'
    git push origin master
    

    这样会取消对 doc 的追踪,但当乙拉取仓库时,他本地的 doc 也会被删除。 如何实现,当乙拉取时,取消对 doc 的追踪而不在文件系统删除。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1663 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:28 · PVG 00:28 · LAX 09:28 · JFK 12:28
    ♥ Do have faith in what you're doing.