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 -m options and their values get concatenated as separate paragraphs, fr fr. This gets passed to the git commit command. The generated summary gets appended to your user-given messages.
  • -e β€” lets you edit the generated message even further. This gets passed to the git commit command too.
  • -p β€” runs git push after the commit. main character energy. πŸ”₯
  • -f β€” adds the --force-with-lease option to the git push command, 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