Skip to content

Commit

Permalink
Short aliases for git commit --amend (bang)
Browse files Browse the repository at this point in the history
With a bang (!) character we can make amending a commit intuitively dangerous.

The idea is taken from Oh-My-Zsh, https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git
  • Loading branch information
bittner committed Nov 2, 2023
1 parent e38696a commit 0413416
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ alias gca='git commit -v -a'
alias gcaa='git commit -a --amend -C HEAD' # Add uncommitted and unstaged changes to the last commit
alias gcam='git commit -v -am'
alias gcamd='git commit --amend'
alias gc!='git commit -v --amend'
alias gca!='git commit -v -a --amend'
alias gcn!='git commit -v --amend --no-edit'
alias gcm='git commit -v -m'
alias gci='git commit --interactive'
alias gcsam='git commit -S -am'
Expand Down

0 comments on commit 0413416

Please sign in to comment.