You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
how would you list all commits that are different between a local branch and a remote reference? I found this issue here that seems to talk about how to solve this problem: src-d/go-git#757 (comment) but when I toyed with the given snippet, it only shows commits if the local reference is ahead. If the remote reference is ahead of the local branch, it doesn't list the commits that are present in the remote branch but not in the local branch.
What I basically would like to do is to implement what git status --short outputs:
## main...origin/main [ahead 1]
or
## main...origin/main [behind 1]
but I would like to also see which commits are different.
I feel like the solution to my problem is really obvious but I can't see the forest for the trees.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
how would you list all commits that are different between a local branch and a remote reference? I found this issue here that seems to talk about how to solve this problem: src-d/go-git#757 (comment) but when I toyed with the given snippet, it only shows commits if the local reference is ahead. If the remote reference is ahead of the local branch, it doesn't list the commits that are present in the remote branch but not in the local branch.
What I basically would like to do is to implement what
git status --shortoutputs:or
but I would like to also see which commits are different.
I feel like the solution to my problem is really obvious but I can't see the forest for the trees.
Beta Was this translation helpful? Give feedback.
All reactions