Git status (on branch master nothing to commit, working tree clean), however with changes commited

3.0K    Asked by akashMishra in Devops , Asked on Feb 18, 2021
Answered by akash Mishra

Your local branch doesn't think about the distant branch. so you need to tell git that your local branch should contrast itself with the distant (beginning/ace for this situation); To see the distinction you should utilize:

git branch --set-upstream-to origin/master

or with the short option:

git branch -u origin/master

This options --set-upstream-to (or -u in short) was introduced in git 1.8.0.

Once you have set this option; git status will show you something like:

# Your branch is ahead of 'origin/master' by 1 commit.

To learn more about Git and Git commands, you can visit Git Tutorial.


Your Answer

Interviews

Parent Categories