GIT-MAGIC(1)
π GIT-MAGIC(1) π
okay bestie, pull up a chair, because git-magic is about to make your whole commit-and-push routine effortless. This one lives in the Git Extras collection, and it's lowkey the laziest-genius command you'll ever meet. β¨
π¦ NAME π¦
git-magic β automate add/commit/push routines π
πΈ SYNOPSIS πΈ
git-magic [-a] [-m msg] [-e] [-p] [-f]
β¨ DESCRIPTION β¨
So here's the tea. git-magic looks at your git status --porcelain output and whips up a summary of changes to use as your commit message. No more staring at a blank message box like π.
Then it commits your staged changes with that generated message, and β if you want β it opens your editor so you can tweak the generated message. Optional. Your call, queen.
And bc we're extra π , staging and pushing can also be automated. Optional too. The whole vibe is "let the command handle it."
π OPTIONS π
-aβ adds everything, including those untracked files you've been ignoring. π-m msgβ use msg as your commit message. Give it multiple-moptions and their values get concatenated as separate paragraphs, fr fr. This gets passed to thegit commitcommand. The generated summary gets appended to your user-given messages.-eβ lets you edit the generated message even further. This gets passed to thegit commitcommand too.-pβ runsgit pushafter the commit. main character energy. π₯-fβ adds the--force-with-leaseoption to thegit pushcommand, for safer force pushing. π (not me reminding you that force pushing is scary β but this is the responsible way to do it.)-hβ prints the synopsis. a little peek, a little refresher. π
π EXAMPLES π
π example one: stage everything, auto commit message
This example stages all changes, then commits with an automatic commit message.
$ git magic -a
[feature/magic dc2a11e] A man/git-magic.md
1 file changed, 37 insertions(+)
create mode 100644 man/git-auto.md
# git log
Author: overengineer <54alpersaid@gmail.com>
Date: Thu Sep 30 20:14:22 2021 +0300
M man/git-magic.md
π example two: -m PREPENDS
Heads up bestie β the -m option PREPENDS the generated message.
$ git magic -am "Added documentation for git magic"
[feature/magic dc2a11e] Added documentation for git magic
1 file changed, 42 insertions(+), 0 deletions(-)
create mode 100644 A man/git-auto.md
$ git log
Author: overengineer <54alpersaid@gmail.com>
Date: Thu Sep 30 20:14:22 2021 +0300
Added documentation for git magic
M man/git-magic.md
π«Ά AUTHOR π«Ά
Written by Alper S. Soylu 54alpersaid@gmail.com β iconic behavior, we stan. π
π REPORTING BUGS π
Found something cursed? Tell the devs here:
<https://github.com/tj/git-extras/issues>
π§ SEE ALSO π§
<https://github.com/tj/git-extras>
May 2026 Β· GIT-MAGIC(1) from the Git Extras fam β that's the whole page, bestie. now go forth and commit slayfully πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms