Created
April 25, 2023 23:57
-
-
Save aprotyas/11e07986efc6d9dd5b9b44bd7dc34b41 to your computer and use it in GitHub Desktop.
git contains: Check if given commit exists in current checkout state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
contains = "!f() { \ | |
if git merge-base --is-ancestor $1 HEAD; then \ | |
echo I contain commit $1; \ | |
else \ | |
echo I do not contain commit $1; \ | |
fi \ | |
}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment