I would like to know if my local repo is up to date (and if not, ideally, I would like to see the changes).
How could I check this without doing git fetch
or git pull
?
I would like to know if my local repo is up to date (and if not, ideally, I would like to see the changes).
How could I check this without doing git fetch
or git pull
?
You'll need to issue two commands:
Another alternative is to view the status of the remote branch using
git show-branch remote/branch
to use it as a comparison you could seegit show-branch *branch
to see the branch in all remotes as well as your repository! check out this answer for more https://stackoverflow.com/a/3278427/2711378You must run
git fetch
before you can compare your local repository against the files on your remote server.This command only updates your remote tracking branches and will not affect your worktree until you call
git merge
orgit pull
.To see the difference between your local branch and your remote tracking branch once you've fetched you can use git diff or git cherry as explained here.