Last active
September 6, 2019 09:26
-
-
Save innocarpe/b850840f634a888717c399bf35be12b9 to your computer and use it in GitHub Desktop.
Find the merge commit from a commit hash & Print the log
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
#!/bin/bash | |
# This will find you the merge commit from a commit hash, and print the log of it. | |
# Use this when you want to know about the merged branch which includes that commit. | |
# | |
# 1. Move this file to ~/.gitsh/ | |
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file | |
# (like ~/.bash_profile or ~/.zshrc) | |
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh') | |
# 3. chmod 0755 git-findmerge | |
# 4. Use the command 'git findmerge COMMIT_HASH' | |
git rev-list $1..$develop --ancestry-path | xargs git log -1 | cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment