Ignoring an already checked-in directory's contents?

后端 未结 6 1408
说谎
说谎 2020-12-04 04:55

I have a git repository that\'s used only to hold graphics and sound files used in several projects. They are all in one directory without sub-directories. Now I just create

6条回答
  •  囚心锁ツ
    2020-12-04 05:15

    If you need to have a tracked file (checked in), but do not want to track further changes of a file while keeping it in your local repository as well as in the remote repository, this can be done with:

    git update-index --assume-unchanged path/to/file.txt
    

    After that any changes to this file will no longer show up in git status.

提交回复
热议问题