Matt Parkins Matt Parkins - 1 year ago 149
Git Question

.gitignore not working

I'm on windows and my

file seems to be being ignored by git - could the .ignore file be corrupt? What file format, locale or culture does git expect?


#this is a comment

Output from
git status

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
# debug.log
# nbproject/
nothing added to commit but untracked files present (use "git add" to track)

I would like it if
did not appear in the untracked files list.

Where should I start looking to fix this?

Answer Source

Fixed. Ok, I created the .gitignore file in notepad on windows and it wasn't working. When I viewed the .gitignore file in linux it looked like organised gibberish - perhaps notepad had written out unicode rather than ascii or whatever 8-bit is.

So I rewrote the file on my linux box, and when I pulled it back into windows it works fine! Hurrah!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download