mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Plugins: git - be less verbose with commits
Remove the -v flag by default with the standard aliases gc, gc!, gca, and gca!, while adding new aliases for those that choose to put the entire diffs in their commit message. In some cases git -v ignores it's rules of cutting everything below the line: # ------------------------ >8 ------------------------ causing the full diff of the commit to be shown in the commit message. This is usually caused by commits that are heavy in shell style comments or mardown files with lots of headers defined (tldr: #'s, bangs). IMHO, and from my understanding of the creators of git and many others - showing a full diff in the commit message not only completely breaks the acceptable/expected format of "good" commit messages, but is also completely redundant and unnecessary. (If you have access to the commit message, more than likely you can access the diff of the commit via a multitude of other methods (CLI tools, GUI tools, web interfaces in a much nicer looking format.)
This commit is contained in:
parent
4224c2a1af
commit
668dc14b28
1 changed files with 10 additions and 5 deletions
|
|
@ -62,11 +62,16 @@ alias gbsg='git bisect good'
|
|||
alias gbsr='git bisect reset'
|
||||
alias gbss='git bisect start'
|
||||
|
||||
alias gc='git commit -v'
|
||||
alias gc!='git commit -v --amend'
|
||||
alias gca='git commit -v -a'
|
||||
alias gca!='git commit -v -a --amend'
|
||||
alias gcan!='git commit -v -a -s --no-edit --amend'
|
||||
alias gc='git commit'
|
||||
alias gc!='git commit --amend'
|
||||
alias gca='git commit -a'
|
||||
alias gca!='git commit -a --amend'
|
||||
alias gcan!='git commit -a -s --no-edit --amend'
|
||||
alias gcv='git commit -v'
|
||||
alias gcv!='git commit -v --amend'
|
||||
alias gcav='git commit -v -a'
|
||||
alias gcav!='git commit -v -a --amend'
|
||||
alias gcanv!='git commit -v -a -s --no-edit --amend'
|
||||
alias gcb='git checkout -b'
|
||||
alias gcf='git config --list'
|
||||
alias gcl='git clone --recursive'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue