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
|
||||
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]
|
||||
excludesfile = ~/.gitignore
|
||||
quotepath = false
|
||||
|
|
20
zsh/aliases
20
zsh/aliases
|
@ -33,23 +33,13 @@ alias tl='tmux list-sessions'
|
|||
alias td='tmux detach'
|
||||
|
||||
# git
|
||||
# I know the git oh-my-zsh plugin has most of these, but
|
||||
# I prefer to specify my own. Check gitconfig to see what
|
||||
# the shorthand commands do.
|
||||
alias g='git'
|
||||
alias ga='git add'
|
||||
# On top of oh-my-zsh's git aliases
|
||||
alias gs='git status'
|
||||
alias gst='git stash'
|
||||
alias gap='git add -p'
|
||||
alias gc='git commit'
|
||||
alias gs='git s'
|
||||
alias gl='git le'
|
||||
alias gf='git f'
|
||||
alias gg='git grep -Ii'
|
||||
alias gf='git ls-files | grep -i'
|
||||
alias gt='git tag'
|
||||
alias gd='git difftool'
|
||||
alias gdl="git ll -1"
|
||||
alias gr='git reset'
|
||||
alias ghr='git reset --hard'
|
||||
alias gbr='git br'
|
||||
alias gtl='git describe --tags --abbrev=0'
|
||||
|
||||
# Laravel
|
||||
alias artisan='php artisan'
|
||||
|
|
13
zshrc
13
zshrc
|
@ -1,11 +1,16 @@
|
|||
# ZSH Env variables
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
|
||||
source ~/.zsh/functions
|
||||
|
||||
# Plugins:
|
||||
# ruby: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/ruby
|
||||
# python: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/python
|
||||
# brew: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/brew
|
||||
plugins=(ruby python brew vi-mode)
|
||||
# see <https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins>
|
||||
plugins=(vi-mode ruby python composer git)
|
||||
if is_mac; then
|
||||
plugins+=brew
|
||||
plugins+=tmux
|
||||
plugins+=vagrant
|
||||
fi
|
||||
|
||||
# Liiiiive!
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
|
Loading…
Reference in a new issue