Skip to content

Instantly share code, notes, and snippets.

@m1entus
Created December 14, 2021 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m1entus/a4ee5a02377fe6ceac85449a6a0d0998 to your computer and use it in GitHub Desktop.
Save m1entus/a4ee5a02377fe6ceac85449a6a0d0998 to your computer and use it in GitHub Desktop.
This will print SHA to closest develop as a parent
#!/bin/bash
# This will print SHA to closest develop as a parent
echo $(git log --decorate | grep 'commit' | grep 'origin/develop' | head -n 1 | awk '{ print $2 }' | tr -d "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment