-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-magic: Automated commit messages #940
Conversation
ff67375
to
861e187
Compare
set -eo pipefail | ||
IFS=$'\n\t' | ||
|
||
cd "$(git rev-parse --show-toplevel)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use git root
to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to left it independent & copy/pasteable?
e) | ||
ARGS+=("-e") | ||
;; | ||
a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, -A
would be better for adding everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git commit
has flag -a
which adds everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also easier to type e.g. git magic -apfm "Updated docs"
@overengineer |
4b225e1
to
e010147
Compare
Introducing a new command that automates git add && git commit routines.
Check commit bodies on this branch to see generated messages:)
Tested only on Linux.
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
git version 2.25.1