How to ignore existing file in Git?

前端 未结 7 507
南笙
南笙 2021-02-05 19:31

I need to work on file.txt locally and in Git, with different content. I want Git not to tell me that there have been changes to that file.

Is this possible

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 20:13

    If modifying the .gitignore file is not an option (because it is checked into git itself), consider using .git/info/exclude.

提交回复
热议问题