Frage

I have some perl scripts that should be under git versioning. I run ctags against them to be able to jump to definitions so a tags file has been autogenerated in the directories. Now I want git to ignore these tags files so I created a .gitignore right next to the .git folder of my repository.
If I do git status I don't see tags but I see .gitignore.
Is .gitignore supposed to appear as an untracked change?

War es hilfreich?

Lösung

The .gitignore file is a regular file from Git's perspective. It is normal to create and commit your .gitignore file early in the project as soon as you know what files should be ignored - There is a collation of lots of ignore files somewher on github to cover whatever languages you have in use. In this can I presume you want this ignoring action to continue, so just commit the .gitignore file with a suitable message e.g. "Added .gitignore file", and carry on happily.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top