3 ms·
> Given some historical check-in, it is quite challenging in Git to find out what came next. It can be done, but it is sufficiently difficult and slow that nobo
by deathanatos 9y ago
> Given some historical check-in, it is quite challenging in Git to find out what came next. It can be done, but it is sufficiently difficult and slow that nobody ever does it.
On the command line:
git for-each-ref --contains <commit, branch, etc.>
Lists all refs (branches, tags) that contain the passed argument.
I'd be curious to know the author's need for this. I've used something similar on GitHub to determine when a given commit, typically a bugfix, is released.
> There is no button in GitHub that shows the descendents of a check-in.
There is: go to the commit's URL (https://github.com/$ORG/$PROJECT/commit/$COMMIT https://github.com/$ORG/$PROJECT/commit/$COMMIT) and below the subject & body of the commit, but above the author/commit time, there's a section that will have all branches, tags, and pull requests that the commit is a part of.
For example: https://github.com/aio-libs/aiohttp/commit/d7f0511ead6d05cf6b7537c1b81f825e8f181ad7 https://github.com/aio-libs/aiohttp/commit/d7f0511ead6d05cf6...
That commit is part of the "master" branch, and the "v3.1.2" tag.¹
¹Note that more tags will likely appear in the future, if you're reading this comment some time from when I'm writing it.