Git ignore locally deleted folder

后端 未结 1 1970
既然无缘
既然无缘 2021-01-30 02:14

I have a Ruby on Rails application which crashes when vendor/rails is present but works fine if it is not. I need to keep this folder deleted in my local copy so th

1条回答
  •  心在旅途
    2021-01-30 02:24

     git ls-files --deleted -z | git update-index --assume-unchanged -z --stdin

    Note that because this is an index-based operation, you cannot set directories to be ignored – only individual files. If upstream ever adds a file inside those directories, you will have to repeat the fix-up.

    0 讨论(0)
提交回复
热议问题