Skip to content

Instantly share code, notes, and snippets.

@dvdotsenko
Last active August 16, 2017 21:57
Show Gist options
  • Save dvdotsenko/1010740 to your computer and use it in GitHub Desktop.
Save dvdotsenko/1010740 to your computer and use it in GitHub Desktop.
Git tune up script - Windows
git config --global alias.co checkout
git config --global alias.cm commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.cp cherry-pick
git config --global alias.ll log --pretty=format:"%C(yellow)%h\\ %Creset%s%Cblue\\ [%cn]\\%Cred%d" --decorate --numstat
git config --global alias.diverged log --left-right --graph --cherry-pick --oneline $1...origin/$1
git config --global core.autocrlf false
git config --global core.filemode false
alias git_clean_local="git branch --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d"
alias git_clean_remote="git branch -r --merged | grep -v '\*\|master\|devops\|newdevops\|stable' | sed 's/origin\///' | xargs -n 1 git push --delete origin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment