I've got a brand new git repo which I've just checked out. I've then made an update to my .gitignore
with the following line:
wp-config.php
My git status
now reads:
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
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)
I add and commit this file (locally). I then update the wp-config.php
file.
However, now, when I run git status
I get the following:
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
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: wp-config.php
I've gone through this .gitignore is not working but the points made don't seem to be applicable as I'm using a completely fresh repo.
Any further suggestions?
Surely I don't have to commit it to the remote ('origin/master') to ignore it locally?