git-magic: Automated commit messages by overengineer · Pull Request #940 · tj/git-extras

Conversation

@overengineer

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

spacewander

@overengineer overengineer changed the title git-magic and git-auto: Automated commit messages git-magic: Automated commit messages

Sep 27, 2021

spacewander

duckunix

spacewander

spacewander

set -eo pipefail
IFS=$'\n\t'

cd "$(git rev-parse --show-toplevel)"

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?

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?

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.

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.

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"

spacewander

spacewander

@spacewander

@overengineer
Could you squash it into a few commits before we can merge it?