I just inherited an existing codebase that has multiple configuration files in it. These configuration files are all generic, meant to be edited and customized for each machine they are downloaded to. Git is (obviously) telling me that they have been edited and is always showing them under "changes not staged for commit" every time I do a git status
. How can I ignore these files under git? Adding them to .gitignore doesn't work because they are already being tracked by git. I don't want to commit anything to the repo, but at the same time I want to tell git not to track these files anymore on my local machine. Is there a way of doing this that I'm not aware of? I know I can git stash
them and they won't be shown anymore, but I feel that is not really what it was meant for... Am I wrong?
Not sure if this changes anything, but I am using git-svn on my local machine to interact with the SVN server.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…