Skip to content
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

Merged
merged 3 commits into from
Oct 10, 2021

Conversation

overengineer
Copy link
Contributor

@overengineer overengineer commented Sep 26, 2021

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

@overengineer overengineer changed the title git-magic and git-auto: Automated commit messages git-magic: Automated commit messages Sep 27, 2021
set -eo pipefail
IFS=$'\n\t'

cd "$(git rev-parse --show-toplevel)"
Copy link
Collaborator

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?

Copy link
Contributor Author

@overengineer overengineer Oct 7, 2021

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)
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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

@overengineer overengineer force-pushed the feature/magic branch 2 times, most recently from 4b225e1 to e010147 Compare October 8, 2021 04:18
@spacewander spacewander merged commit b33ec65 into tj:master Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants