Reputation: 2764
I need a machine parsable way of comparing the current branch to the local copy of the tracking branch.
These are the ideas I've tried, with their caveats:
Thanks for any ideas
Upvotes: 0
Views: 311
Reputation: 70673
I think the command you are looking for is:
git rev-list HEAD..HEAD@{u}
This will list all commit SHAs that are on the tracking branch but not your local branch. rev-list
is simply command for listing revisions and the @{u}
on a branch name means “the remote tracking-branch of this branch”.
Upvotes: 2