Reputation: 23
I have received feedback on my first ever programming assignment in Python. In general, it was pretty good but I don't fully understand one point. To mark the assignment my teacher cloned my repo via github. The feedback advised using "an appropriate .gitignore that doesn't upload .gitignore itself".
Can anyone expand on this point for me? Still trying to get familiar with git and don't fully understand gitignore.
Upvotes: 2
Views: 114
Reputation: 2171
Each line in the .gitignore file establishes a pattern. When deciding if a file should be ignored, Git looks to see if it matches one of the patterns in the .gitignore file.
If you added the text .gitignore
into the .gitignore file, the .gitignore file itself would not be controlled within the Git version control system, and would not get uploaded to a remote repository.
Controlling the .gitignore file within Git is no bad thing, however, in my humble opinion. It means all users of the repository have access to the same configuration.
Upvotes: 3