Created
August 11, 2017 17:30
-
-
Save tithonium/3d06cd8c957a1695e056b1b8aef303dc to your computer and use it in GitHub Desktop.
Aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ..="cd .." | |
alias cd..="cd .." | |
edit() { | |
$EDITOR $* | |
} | |
alias ff="find . -type f | grep -vF .git | grep -vF .DS_Store | grep -vF .keep | grep -vF /node_modules/" | |
alias faf="find . -type f" | |
alias fd="find . -type d | grep -vF .git" | |
alias ts='date "+%Y%m%d%H%M%S"' | |
alias tss='date "+%Y%m%d"' | |
alias bz="bzip2" | |
alias gz="gzip" | |
alias jpp='python -mjson.tool' | |
alias ecron="nano ~/.crontab ; crontab ~/.crontab ; crontab -l" | |
alias al="tail -n0 -f /var/log/apache*/*log /var/www/log/*log /var/log/apache2/vhosts/*/*/*/*log" | |
alias gits="git st" | |
alias gitl="git l" | |
alias gitlp="git l -p" | |
alias gitv="git viz" | |
alias gitb="git browse" | |
alias gitdiff="git diff -U10 -w" | |
alias gitd=gitdiff | |
alias gitdiffs="git diff -U10 -w --staged" | |
alias gitds=gitdiffs | |
alias gitpr="git make-pull-request" | |
alias export-current-branch='export BRANCH=`git current-branch` ; echo $BRANCH' | |
if [ "`which rbenv`" != "" ]; then | |
alias enbundle="( (rbenv which bundle >/dev/null 2>&1) || gem install bundler) && bundle install" | |
else | |
alias enbundle="(which -s bundle || gem install bundler) && bundle install" | |
fi | |
alias dir="ls -lFgA" | |
UN=`uname` | |
if [ "$UN" == "Linux" ]; then | |
alias l="tail -f /var/log/messages /var/log/syslog" | |
alias dir="ls -lFA --color=auto" | |
alias la="ls -FA --color=auto" | |
alias p="ps axfw" | |
if [ "$EUID" != 0 ]; then | |
alias apt-get="sudo apt-get" | |
alias cpan="sudo cpan" | |
fi | |
elif [ "$UN" == "Darwin" ]; then | |
alias l="tail -f log/*log" | |
REV=`uname -r` | |
alias dir="ls -lAFG" | |
alias p="ps axw" | |
alias top="top -ocpu" | |
if [ "$REV" '>' "12.0.0" ]; then | |
alias rgrep="find . -type f -follow -print0 | xargs -0 grep " | |
else | |
alias rgrep="find . -type f -follow -print0 | grep -zZvF .svn | grep -zZvF .git | grep -zZvF vcr_cassettes | grep -zZvF sass-cache | xargs -0 grep " | |
fi | |
alias restart="osascript -e 'tell application \"Finder\" to restart'" | |
alias htop='sudo htop' | |
else | |
alias dir="ls -lA" | |
fi | |
if [ "`which fzf`" != "" ]; then | |
if [ "`which ag`" != "" ]; then | |
export FZF_DEFAULT_COMMAND='ag -g ""' | |
fi | |
alias fm='fzf | m' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[push] | |
default = tracking | |
[alias] | |
l = log --stat | |
co = checkout | |
theirs = checkout --theirs | |
ours = checkout --ours | |
br = branch | |
ci = commit | |
st = status -sb | |
rename = mv | |
unstage = reset HEAD -- | |
amend = commit --amend --reset-author | |
amend-no-reset = commit --amend | |
amend-quick = commit --amend --reset-author --no-edit | |
last = log -1 HEAD | |
viz = !gitx --all | |
hack = !hack | |
ship = !ship | |
current-branch = !git branch | grep '\\*' | awk '{print $2}' | |
freeze = update-index --assume-unchanged | |
thaw = update-index --no-assume-unchanged | |
has = branch -a --contains | |
thas = tag --contains | |
loose-branches = branch -r -v --no-merged | |
continue = rebase --continue | |
abort = rebase --abort | |
count = shortlog -sn | |
worddiff = diff --word-diff | |
enable-pr-branches = config --local --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*" | |
rework = !git co master && git branch -D working && git co -b working && hack | |
new-work = !git rework && git co -b | |
repull-branch = !CURRENT=`git current-branch` && git co master && git fetch && git branch -D $CURRENT && git co $CURRENT | |
tracking-branch = !git rev-parse --abbrev-ref --symbolic-full-name @{u} | |
update-branch = !TRACKING=`git tracking-branch` && git fetch && git rebase $TRACKING | |
uncommit = !git stash && git reset --soft HEAD^ && git unstage . && git stash pop | |
checkpoint = !LASTMSG=`git log -1 --pretty=%B` && git add -A && ((test \"X$LASTMSG\" = \"Xcheckpoint\") && git amend-quick) || git commit -m checkpoint | |
make-pull-request = !CURRENT=`git current-branch` && git push --set-upstream origin $CURRENT && hub pull-request -o | |
tidy = !git fetch && git remote prune origin && git gc | |
merged = !is-git-merged | |
no-pending = !git diff --no-ext-diff --quiet --exit-code | |
[include] | |
path = ~/.gitconfig.local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment