I have my sitemap.xml file that I want to leave on the repository (as it is continually updated) however ignore it from any future code commits (as I don't want it to be overwritten).
So to do this - from my reading I need to:
- add the file path into
.gitignore
- As it was committed
initially into the repo I need to remove it from being a tracked
file so:
git rm --cached <file>
However will step also remove from the repo? How do I therefore handle this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…