LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-magic

Commit changes with an auto-generated commit message

TLDR

Commit staged changes with a generated message
$ git magic
copy
Stage all changes (with confirmation) and commit
$ git magic -a
copy
Commit and push
$ git magic -p
copy
Commit and force-push
$ git magic -p -f
copy
Prepend a custom title before the generated message
$ git magic -m "[title]"
copy
Edit the generated message before committing
$ git magic -e
copy

SYNOPSIS

git magic [-a] [-m msg] [-e] [-p] [-f]

DESCRIPTION

git magic is a git-extras command that commits changes using an automatically generated commit message built from `git status --porcelain -uno`, so the message ends up listing the files that changed. By default the commit happens without opening an editor (`--no-edit`).Passing `-a` shows `git status`, asks for confirmation, then stages everything before committing. `-m` lets you prepend a real message before the auto-generated summary, `-e` opens an editor to adjust the final message, and `-p` (optionally with `-f` for a force-push) pushes immediately after the commit.

PARAMETERS

-a

Stage all changes (after confirmation) before committing.
-m msg
Prepend a custom message; the generated summary is appended after it.
-e
Open the editor to review the message instead of committing with `--no-edit`.
-p
Push after committing.
-f
Force-push; only takes effect combined with `-p`.
-h
Display usage information.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Must be run inside a git working tree; it changes to the repository's top level automatically. The generated message is just a list of changed files, not a meaningful description, so this is best suited for quick WIP commits rather than history you intend to keep readable.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid