Last active
March 6, 2026 16:06
-
-
Save xyfeng/1ecaf617068d811154c78fa3670d51b3 to your computer and use it in GitHub Desktop.
bash alias
This file contains hidden or 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
| #export GOOGLE_APPLICATION_CREDENTIALS=/Users/xy/.config/gcloud/application_default_credentials.json | |
| # The next line updates PATH for the Google Cloud SDK. | |
| if [ -f '/Users/xy/Documents/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/xy/Documents/google-cloud-sdk/path.zsh.inc'; fi | |
| # The next line enables shell command completion for gcloud. | |
| if [ -f '/Users/xy/Documents/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/xy/Documents/google-cloud-sdk/completion.zsh.inc'; fi | |
| alias ls='ls -FGOp' | |
| alias la='ls -FGOla' | |
| alias lsg='ls -a | grep -ie ' | |
| alias lsl='ls | less' | |
| alias h='history' | |
| alias scs='source ~/.bashrc' | |
| alias seebs='open ~/.bashrc' | |
| # 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' | |
| 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 --sort=-committerdate' #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 gpo='git push --set-upstream origin $(git branch --show-current)' | |
| alias gskip='git update-index --assume-unchanged' # ignore local file change | |
| alias gunskip='git update-index --no-assume-unchanged' # undo ignore local file change | |
| grewind() { git reset HEAD~"$1"} | |
| #################### | |
| gsucp() { gsutil cp gs://reduct-prod-storage/"$1" ~/Desktop } | |
| gsucp-dev() { gsutil cp gs://reduct-dev-storage/"$1" ~/Desktop } | |
| #################### | |
| alias cdgit='cd ~/git/' | |
| alias cdmono='cd ~/Desktop/Reduct/MONO-REPO/' | |
| #################### | |
| alias nins='sudo npm install ' | |
| alias ninsg='sudo npm install -g ' | |
| #################### | |
| alias pserver='python3 -m http.server' | |
| #################### | |
| alias video2gif='function video_to_gif(){ ffmpeg -i $1 output.gif && gifsicle -O3 output.gif -o output.gif && say "Video is ready!"};video_to_gif' | |
| #################### | |
| alias iplocal='ipconfig getifaddr en0' | |
| alias ippublic='curl ifconfig.me' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment