Skip to content

Instantly share code, notes, and snippets.

@akolybelnikov
Forked from pavbsu/.bashrc
Last active April 21, 2020 12:47
Show Gist options
  • Save akolybelnikov/a8aa68d8d50eb61dfd55f441c92b567a to your computer and use it in GitHub Desktop.
Save akolybelnikov/a8aa68d8d50eb61dfd55f441c92b567a to your computer and use it in GitHub Desktop.
Git Bash aliases for Windows
# create a file C:\Users\[user]\.bashrc
# add this content
# add your own aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
# run `source ~/.bashrc` in console
alias la='ls -A'
alias l='ls -CF'
alias gs='git status -bsu'
alias gss='git diff --stat'
alias gsscached='git diff --cached --stat'
alias gd='git difftool HEAD --dir-diff'
alias gc='git checkout'
alias gcm='git checkout master'
alias gb='git branch'
alias gp='git pull'
alias ga='git add'
alias gl='git log'
alias gr='git rebase'
alias grm='git rebase master'
alias gpo='git push origin'
alias gamend='git commit --amend --no-edit'
alias grc='git rebase --continue'
alias gbd='git branch --merged | grep -v "\*" | grep -v "master" | grep -v "develop" | xargs -n 1 git branch -d'
alias r='clear'
alias cl='clear'
alias n='start notepad++'
alias sb='notepad ~/.bashrc'
alias sob='source ~/.bashrc'
alias dev='cd c:/dev/'
alias gcom='git commit -m'
alias gpou='git push --set-upstream origin $(git symbolic-ref HEAD --short)'
alias glc="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment