I have a repository, and the .gitignore is right under the repository.
When I do a git status
, there's annoying file src/main/resource/git.properties
that keeps showing up, and sometimes blocks me from doing a git pull
.
I searched that .gitignore
can help, so I added the path src/main/resource/git.properties
to the top of the file. if I do a cat .gitignore
, it gives
src/main/resource/git.properties
logs/*.log
I also did
git config --global core.excludesfile .gitignore
Then I do git status
,
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
modified: src/main/resources/git.properties
no changes added to commit (use "git add" and/or "git commit -a")
What I expected was doing git status
would say there's no change to the master.
Help please.