Hacker News new | ask | show | jobs
by kmacleod 920 days ago

  git log <base-branch>..<branch>
I often need the count of commits, usually for build IDs,

  git rev-list --count <branch> ^<base-branch>
I usually use gitk for visualizing branch commits. CLI equivalent is

  git log --graph --oneline --all
1 comments

he is saying that finding <base-branch> is too hard. There is probably some magic with git merge-base or git show-branch but I don't know them well enough to do it