Reputation: 397
I am setting up a new repository and I have the following in the .gitignore file:
*.pro.user
*.o
However, when I do git status
am seeing those ignored files listed. What is more, I am not able to add the .gitignore
file in the repository, when I write : git add .git/.gitignore
. How is this supposed to work?
Upvotes: 2
Views: 754
Reputation: 45649
The .gitignore
file does not go in the .git/
directory. Move it to your worktree root and it should work (and you'll be able to commit it there).
Upvotes: 4
Reputation: 36765
The .gitignore
file goes into your repository workspace (outside, and next to .git/
), not into .git/
.
Upvotes: 8