Skip to content

Instantly share code, notes, and snippets.

@xyfeng
Last active April 12, 2019 19:30
Show Gist options
  • Save xyfeng/1ecaf617068d811154c78fa3670d51b3 to your computer and use it in GitHub Desktop.
Save xyfeng/1ecaf617068d811154c78fa3670d51b3 to your computer and use it in GitHub Desktop.
bash alias
alias scs='source ~/.bashrc'
alias seebs='open -a TextEdit ~/.bashrc'
alias ls='ls -FGOp'
alias la='ls -FGOla'
alias lsg='ls -a | grep -ie '
alias lsl='ls | less'
alias h='history'
# git ##############
alias gdiff='git diff '
alias gtheirs='git checkout --theirs '
alias gours='git checkout --ours '
alias gups='git fetch upstream && git merge upstream/master'
alias gcon='cat .git/config'
alias vcon='vi .git/config'
alias gad='git add -A .'
alias grad='git remote add origin'
alias gst='git status'
alias gc='git clone '
alias gcd='git clone --depth=50 --branch=master'
alias greset='git reset —-HARD'
alias grb='git rebase -i ' #interactive rebase (squash)
alias grm='git rm --cached ' # remove but dont delete
alias gcm='git commit -a ' #commit changed files to current branch
alias gcmm='git commit -a -m "updates"' #commit changed files to current branch
alias glb='git branch -a' #list branches
alias gcb='git checkout ' # switch to branch
alias gmer='git merge ' # merge one branch into another (often master)
alias gpl='git pull'
alias gp='git push'
alias gcp='gcmm && gp' #push with dummy commit (no pull!!)
alias gtad='git tag -a' # add a tag
alias gtst='git tag' # list tags
alias gtp='git push —-tags' # push tags
alias gff='git flow feature' # flow feature
alias gfh='git flow hotfix' # flow hotfix
####################
alias nins='sudo npm install '
alias ninsg='sudo npm install -g '
####################
alias pserver='python -m SimpleHTTPServer'
####################
alias cdgit='cd ~/git/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment