Skip to content

Instantly share code, notes, and snippets.



Created Oct 20, 2017
What would you like to do?
git first-child
first-child = "!f() { git log --reverse --ancestry-path --pretty=%H $1..${2:-HEAD} | head -1; }; f"

This comment has been minimized.

Copy link
Owner Author

@jglick jglick commented Oct 20, 2017

Taken from this tip.

Useful as a branch point for Maven projects; e.g.,

git checkout -b 1.23.x `git first-child this-project-1.23`
mvn versions:set -DnewVersion=1.23.1-SNAPSHOT
git commit -a -m 'Prep for 1.23.1'



and anything else besides <version>s that might have changed in the [maven-release-plugin] prepare for next development iteration commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.