Last active
December 3, 2021 14:34
-
-
Save mgurov/47e3adf484d007fcf9f3b86eef52d07e to your computer and use it in GitHub Desktop.
gitline - a shell alias to derive a git branch name from the last commit subject and push to origin
This file contains hidden or 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 gitline='git log -n 1 --format=''%s'' | xargs echo refs/heads/mykola | tr " :" _ | xargs git check-ref-format --normalize | xargs -I {} git push origin HEAD:{} || echo something went wrong' | |
gitline() { | |
git log -n 1 --format='%s' | tr " :.'" _ | xargs -I {} echo refs/heads/mykola_{} | xargs git check-ref-format --normalize | xargs -I {} git push origin HEAD:{} || echo something went wrong | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or rather