user1678808
user1678808

Reputation:

.gitignore still including files

I downloaded .gitignore for C# (https://github.com/github/gitignore/blob/master/CSharp.gitignore) for my repo (https://github.com/feick/Water-Tank). I included the .gitignore in the first commit, then I made a second commit with the project files. On my repo, it is still showing unwanted folders/files that should have been excluded while using .gitignore (/bin,/obj,etc.). I'm assuming it's a user error on my part, so I was wondering if someone could let me know what I did wrong.

Upvotes: 2

Views: 520

Answers (2)

Diego Mijelshon
Diego Mijelshon

Reputation: 52745

Since you have already committed those files to your repo, you have to remove them (using git rm, for example) and commit.

The bad part is that the binaries will still live forever on the repo, so you should probably delete and recreate it.

Upvotes: 0

max
max

Reputation: 34437

Rename CSharp.gitignore file to .gitignore

Upvotes: 3

Related Questions