LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-abort

abort any in-progress git operation (rebase, merge, cherry-pick, revert, am)

TLDR

Abort whatever is in progress
$ git abort
copy

SYNOPSIS

git abort

DESCRIPTION

git abort is a convenience command from the git-extras suite. It detects which git operation is in progress by inspecting the `.git` directory and runs the matching abort:- Rebase in progress (`rebase-merge/` or `rebase-apply/`) → `git rebase --abort`- Merge in progress (`MERGE_HEAD`) → `git merge --abort`- Cherry-pick in progress (`CHERRYPICKHEAD`) → `git cherry-pick --abort`- Revert in progress (`REVERT_HEAD`) → `git revert --abort`- `git am` in progress (`rebase-apply/applying`) → `git am --abort`If nothing is in progress, it prints a message and exits non-zero.

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

Provided by git-extras, not a built-in git command. Install via your package manager (`apt install git-extras`, `brew install git-extras`, etc.) or from source. All aborts are destructive with respect to the operation that was running — uncommitted merge resolutions or rebase edits are discarded. Your working tree is reset to the state before the operation began.

HISTORY

git-extras is a long-running project by TJ Holowaychuk that bundles dozens of git subcommands for everyday workflows. `git abort` was added to consolidate the operation-specific `--abort` flags under one memorable command.

SEE ALSO

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