Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Given a commit, find immediate children of that commit.
#!/bin/bash -e
# given a commit, find immediate children of that commit.
for arg in "$@"; do
for commit in $(git rev-parse $arg^0); do
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do
git describe $child
done
done
done

kvudata commented Jan 17, 2018

Doesn't seem to work for me, I just get a "fatal: No names found, cannot describe anything."
I'm running git version 2.13.5 (Apple Git-94)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment