Reputation: 9794
When I run the command: git status
on my local git branch, I see the following:
Your branch is ahead of 'origin/XXX' by 415 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
I am not sure how I got so many commits in my local branch when I did not do it. Is there a way for me to list all the commits + details associated with each commit so that I can understand what might have happened and if it safe for me to do a git push.
Upvotes: 0
Views: 44
Reputation: 5151
I think you want to use Log and specify a range:
$ git log --oneline origin/XXX..HEAD
You can even omit HEAD
:
$ git log --oneline origin/XXX..
Upvotes: 2
Reputation: 2066
The below command will give you the list of files changed locally and not present in remote
git diff origin/XXX <local_branch> --name-only
If you want the entire diff then use
git diff origin/XXX <local_branch>
Upvotes: 1