【问题标题】:Remove file in specified path from git tracking [duplicate]从 git 跟踪中删除指定路径中的文件 [重复]
【发布时间】:2012-02-07 08:40:47
【问题描述】:

可能重复:
git - removing a file from source control (but not from the source)

我有一个位于 project/app/assets/javascripts 路径中的 .DS_Store 文件。

如何从这个文件中删除 git tracking?

【问题讨论】:

标签: git


【解决方案1】:
 rm .DS_Store
 git add -A
 git commit -m "getting rid of artifact."
 echo .DS_Store >> .gitignore
 git add -A
 git commit -m "ignoring artifact."

【讨论】:

    猜你喜欢
    • 2014-08-09
    • 2013-11-17
    • 2017-10-23
    • 2016-02-27
    • 2016-02-07
    • 2018-07-21
    • 1970-01-01
    • 1970-01-01
    • 2019-04-19
    相关资源
    最近更新 更多