I used to develop on linux environment, but now I need to write a git project on "windows" os. I need to ignore a directory from where the git is initiated.
like folder/.git/
, now I need to ignore /folder/project/bin/*
. So I have added .gitignore file on folder/.gitignore
using both text pad and Visual studio.
.gitignore file contents are
/project/bin/*
Now, I expect git status
should not show /project/bin
folder.
Note, I have tried other ways too, but it seems that git is considering the .gitignore file as a general text file or so.
Just a guess, but I suspect that the leading forward-slash is throwing something off. I'm not sure about the trailing star either (as I reference my own .gitignore files).
Your .gitignore should be this:
project/bin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With