I often use git status
when looking in folders that may not have been synchronised with their repo for a while, just to see where I am. If I see your branch is up to date...
then I assume it's ok to start working and committing.
However I just had this happen:
MINGW64 /path/to/my/project (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
MINGW64 /path/to/my/project (master)
$ git pull
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From gitlab.mydomain.com/project
f5b203f..4ecb3eb master -> origin/master
Updating f5b203f..4ecb3eb
Fast-forward
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
create mode 100644 CHANGELOG
MINGW64 /path/to/my/project (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Why did my first git status
command not realise that there was a file missing?
If it's relevant, there are currently only two commits and two files in the repo. In the 2nd commit I added the CHANGELOG
file.