Rely on oh-my-zsh git plugin & aliases
This commit is contained in:
parent
730b0f3ca0
commit
1571905736
43
gitconfig
43
gitconfig
|
@ -2,49 +2,6 @@
|
||||||
name = Henrik Lissner
|
name = Henrik Lissner
|
||||||
email = henrik@lissner.net
|
email = henrik@lissner.net
|
||||||
|
|
||||||
[alias]
|
|
||||||
# common commands
|
|
||||||
a = add
|
|
||||||
s = status -s
|
|
||||||
c = commit
|
|
||||||
ca = commit --amend
|
|
||||||
br = branch
|
|
||||||
cl = clone
|
|
||||||
co = checkout
|
|
||||||
co- = checkout --
|
|
||||||
|
|
||||||
# reset commands
|
|
||||||
r = reset
|
|
||||||
r1 = reset HEAD^ --soft
|
|
||||||
r2 = reset HEAD^^ --soft
|
|
||||||
rh = reset --hard
|
|
||||||
rh1 = reset HEAD^ --hard
|
|
||||||
rh2 = reset HEAD^^ --hard
|
|
||||||
|
|
||||||
# search commadns
|
|
||||||
f = "!git ls-files | grep -i"
|
|
||||||
grep = grep -Ii
|
|
||||||
lasttag = describe --tags --abbrev=0
|
|
||||||
|
|
||||||
# Diff commands
|
|
||||||
d = difftool
|
|
||||||
dl = "!git ll -1"
|
|
||||||
|
|
||||||
# Ways to show the log
|
|
||||||
l = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
|
|
||||||
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
|
||||||
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
|
|
||||||
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
|
|
||||||
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
|
|
||||||
le = log --oneline --decorate
|
|
||||||
|
|
||||||
# Ignoring files the elegant way
|
|
||||||
assume = update-index --assume-unchanged
|
|
||||||
unassume = update-index --no-assume-unchanged
|
|
||||||
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
|
|
||||||
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
|
|
||||||
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
|
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
quotepath = false
|
quotepath = false
|
||||||
|
|
20
zsh/aliases
20
zsh/aliases
|
@ -33,23 +33,13 @@ alias tl='tmux list-sessions'
|
||||||
alias td='tmux detach'
|
alias td='tmux detach'
|
||||||
|
|
||||||
# git
|
# git
|
||||||
# I know the git oh-my-zsh plugin has most of these, but
|
# On top of oh-my-zsh's git aliases
|
||||||
# I prefer to specify my own. Check gitconfig to see what
|
alias gs='git status'
|
||||||
# the shorthand commands do.
|
alias gst='git stash'
|
||||||
alias g='git'
|
|
||||||
alias ga='git add'
|
|
||||||
alias gap='git add -p'
|
alias gap='git add -p'
|
||||||
alias gc='git commit'
|
alias gf='git ls-files | grep -i'
|
||||||
alias gs='git s'
|
|
||||||
alias gl='git le'
|
|
||||||
alias gf='git f'
|
|
||||||
alias gg='git grep -Ii'
|
|
||||||
alias gt='git tag'
|
alias gt='git tag'
|
||||||
alias gd='git difftool'
|
alias gtl='git describe --tags --abbrev=0'
|
||||||
alias gdl="git ll -1"
|
|
||||||
alias gr='git reset'
|
|
||||||
alias ghr='git reset --hard'
|
|
||||||
alias gbr='git br'
|
|
||||||
|
|
||||||
# Laravel
|
# Laravel
|
||||||
alias artisan='php artisan'
|
alias artisan='php artisan'
|
||||||
|
|
13
zshrc
13
zshrc
|
@ -1,11 +1,16 @@
|
||||||
# ZSH Env variables
|
# ZSH Env variables
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
|
|
||||||
|
source ~/.zsh/functions
|
||||||
|
|
||||||
# Plugins:
|
# Plugins:
|
||||||
# ruby: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/ruby
|
# see <https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins>
|
||||||
# python: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/python
|
plugins=(vi-mode ruby python composer git)
|
||||||
# brew: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/brew
|
if is_mac; then
|
||||||
plugins=(ruby python brew vi-mode)
|
plugins+=brew
|
||||||
|
plugins+=tmux
|
||||||
|
plugins+=vagrant
|
||||||
|
fi
|
||||||
|
|
||||||
# Liiiiive!
|
# Liiiiive!
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
Loading…
Reference in a new issue