.gitignore not working
Example .gitignore
#this is a comment
debug.log
nbproject/
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)
You would like it if debug.log and nbproject/ did not appear in the untracked files list.
Solution:
git rm . -r --cached
git add .
Written by Nguyen Bao Duy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Gitignore
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#