Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why do I get "nothing to commit, working tree clean" after a merge request?

Why does git status in branch develoment after a merge request on origin develoment in gitlab tell me "nothing to commit, working tree clean" but when I do a git pull in branch development it fetches the latest status. I can’t imagine that this is a bug. Git and Gitlab are too ingenious for that. What am I getting wrong?

git checkout development
git status

On branch development
Your branch is up to date with 'origin/development'.

nothing to commit, working tree clean

git pull

remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 16 (delta 14), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (16/16), 1.56 KiB | 177.00 KiB/s, done.

Updating ec27aa4..75941c3
Fast-forward
 .env                           |  1 +
 .env.node                      |  3 ++-
...
 8 files changed, 25 insertions(+), 12 deletions(-)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

What am I getting wrong?

git status doesn’t know about updates to remote branches; it just looks at the current state of your local repo. If you were to run git fetch, git would download the remote changes. If you then run git status, it’ll tell you that your local branch is behind.

git pull is essentially a combination of git fetch and git merge, so running it automatically gets the remote changes.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading