Reputation: 5351
I have the following 2 lines in .gitignore
Valhalla/.idea/
Valhalla/target/
When I push to GitHub, it skips the .idea folder, but it still uploads the target folder. How can I make it also skip the target folder?
Upvotes: 0
Views: 29
Reputation: 12449
.gitignore
only works for folders that are not already tracked. So if you had previously committed the folder Valhalla/target
then it's going to keep tracking it. To resolve that do the following:
Valhalla/target
in your .gitignore
Valhalla/target
in your project.gitignore
That folder show now be untracked and if you add it back then it should be ignored and not re-added.
Upvotes: 2