I can't seem to work out why my .gitignore isn't ignoring a simple text file. I have read the manual and I think I've done all required steps.
Firstly I created a new repo like this:
C:\> mkdir test
C:\> cd test
C:\test> git init
Then I created and comitted a .gitignore which ignores a file called junk.txt
C:\test [master]> touch .gitignore
C:\test [master +1 ~0 -0 !]> echo 'junk.txt' >> .gitignore
C:\test [master +1 ~0 -0 !]> git add .gitignore
C:\test [master +1 ~0 -0]> git commit -m 'ignoring junk.txt'
By now I would assume if I have a file called junk.txt git would ignore it. But how come it's still saying that as an untracked file?
C:\test [master]> touch junk.txt
C:\test [master +1 ~0 -0 !]> git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# junk.txt
I'm using msysgit
C:\test [master +1 ~0 -0 !]> git --version
git version 1.8.0.msysgit.0