V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cloudsthere
V2EX  ›  问与答

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

  •  
  •   cloudsthere · Jun 24, 2017 · 3007 views
    This topic created in 3240 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   ·   3787 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:42 · PVG 12:42 · LAX 21:42 · JFK 00:42
    ♥ Do have faith in what you're doing.