How to NOT commit locally deleted files to git

后端 未结 4 1487
醉梦人生
醉梦人生 2021-01-22 18:33

We have a situation where were are using git to stash myriad scans (images) and do not wish to preserve them on the local machine once set on up; however, git is seeing each loc

4条回答
  •  被撕碎了的回忆
    2021-01-22 19:25

    For each file to be deleted, do this:

    git update-index --assume-unchanged 
    

    This should stop Git from asking you to commit the deletion.

    That being said, perhaps a better solution would be to use SFTP with permissions set to disallow deleting or modifying files once uploaded.

提交回复
热议问题