[git] Clean up config formatting, color diffs
Made git aliasing exit if no git executable is found (which should not happen, but still) instead of putting all aliases into the conditional. Added unified colors to git diffs. Cleaned up formatting of the files.
This commit is contained in:
parent
7895b1c052
commit
17f8ca062d
2 changed files with 96 additions and 78 deletions
|
@ -22,6 +22,18 @@
|
||||||
rebase = true # always rebase on pulling, obviates merge commits
|
rebase = true # always rebase on pulling, obviates merge commits
|
||||||
[diff]
|
[diff]
|
||||||
colorMoved = zebra # also color stuff that has simply been moved, in a classy zebra-color
|
colorMoved = zebra # also color stuff that has simply been moved, in a classy zebra-color
|
||||||
|
[color.diff]
|
||||||
|
meta = "9"
|
||||||
|
frag = "magenta bold"
|
||||||
|
commit = "yellow bold"
|
||||||
|
old = "red bold"
|
||||||
|
new = "green bold"
|
||||||
|
whitespace = "red reverse"
|
||||||
|
[color.diff-highlight]
|
||||||
|
oldNormal = "red bold"
|
||||||
|
oldHighlight = "red bold 52"
|
||||||
|
newNormal = "green bold"
|
||||||
|
newHighlight = "green bold 22"
|
||||||
[rebase]
|
[rebase]
|
||||||
autostash = true
|
autostash = true
|
||||||
autoSquash = true
|
autoSquash = true
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
if ! exist git; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
# git alias
|
# git alias
|
||||||
if exist git; then
|
|
||||||
alias g='git'
|
alias g='git'
|
||||||
|
|
||||||
alias ga='git add'
|
alias ga='git add'
|
||||||
|
@ -44,6 +48,7 @@ if exist git; then
|
||||||
|
|
||||||
alias grbi='git rebase -i'
|
alias grbi='git rebase -i'
|
||||||
alias grbc='git rebase --continue'
|
alias grbc='git rebase --continue'
|
||||||
|
alias grbm='git rebase master'
|
||||||
|
|
||||||
alias gst='git status'
|
alias gst='git status'
|
||||||
|
|
||||||
|
@ -62,4 +67,5 @@ if exist git; then
|
||||||
esac
|
esac
|
||||||
alias gstp='git stash pop'
|
alias gstp='git stash pop'
|
||||||
alias gstl='git stash list'
|
alias gstl='git stash list'
|
||||||
fi
|
alias gstL='git stash list --stat'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue