How to Count the Number of Commits After a Specific Commit in Git

from blog Write Software, Well, | ↗ original
Counting the number of commits after a specific commit in Git is a common task when you make small but frequent commits and need to squash them before rebasing from the main branch. This post shows one simple way to do this in git. Let me know if you know a better solution.