Created
May 13, 2017 05:16
-
-
Save dmcnulla/7da7fc3d95594a29fc87a82da43cd3bb to your computer and use it in GitHub Desktop.
bash profile
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
# generated by Git for Windows | |
test -f ~/.profile && . ~/.profile | |
test -f ~/.bashrc && . ~/.bashrc | |
# aliases added by dmcnculla | |
alias s='subl ' | |
alias tj='tar -xvjpf' | |
alias t='tar xvfz ' | |
alias tz='tar -xvzpf' | |
alias inet='ifconfig | grep inet' | |
alias ip='inet | grep "inet addr" | grep -v "127.0.0.1"' | |
alias hg='history|grep -v grep|grep ' | |
alias pg='ps -eaf|grep -v grep|grep ' | |
alias ll='ls -la ' | |
alias lla='ls -la ' | |
alias lg='lla|grep ' | |
function process_by_port { | |
sudo netstat -anp|grep "\W$1\W" | |
} | |
# cd | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
#Git | |
alias gs='git status ' | |
alias gmma='gs | grep "both\ modified" | awk "{print \$3}" ' | |
alias gma='gs | grep "modified" | awk "{print \$2}" | xargs git add ' | |
alias gmr='gm | xargs git reset HEAD ' | |
# Remove deleted | |
alias gdl='gs | grep deleted | awk "{print \$2}" ' | |
alias gdla='gdl | xargs git rm ' | |
# Add individual | |
alias ga='git add ' | |
# commit | |
alias gc='git commit -m ' | |
alias gmc='gma; gc ' | |
# diffs | |
alias gd='git diff ' | |
alias gdh="git diff HEAD~1 " | |
# history | |
alias gh='git hist' | |
alias ghl='git hist | less' | |
#stash | |
alias gstd='git stash drop stash@{0}' | |
alias gsts='git stash show stash@{0}' | |
alias go='git checkout ' | |
alias gbo='go -b ' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment