Last active
November 6, 2019 07:23
-
-
Save hlung/e94911bf5e5a4320eaca11100d22922a to your computer and use it in GitHub Desktop.
Do git add and commit with auto generated message. For laziness reasons π.
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
# Do git add and commit with auto generated message. For laziness reasons π. | |
# It simply reads `git status -s`, converts the beginning M -> Update, A -> Add, and D -> Delete, and use it as a commit message. | |
# Example: | |
# git status: M updated.txt | |
# generated message: Update updated.txt | |
# | |
# For debugging sed part: | |
# echo "M updated.txt\nA added.txt\nD deleted.txt\nR events/BaseEvents.yml -> events/AppEvents.yml" | sed "s/^M /Update/;s/^A /Add/;s/^D /Delete/;s/^R /Rename/;s/->/to/" | |
alias gaca='git add .; git status -s | sed "s/^M /Update/;s/^A /Add/;s/^D /Delete/;s/^R /Rename/;s/->/to/" | git commit --file -' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment