Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (49 sloc) 2.12 KB
@REM Status colors working OK with powershell
git config --global color.status.changed "yellow normal bold"
git config --global color.status.untracked "green dim bold"
@REM Show last commit
git config --global --unset alias.last
git config --global alias.last "log -1 HEAD --name-status"
@REM Verbose log
@REM Usage: git lv -20
git config --global --unset alias.lv
git config --global alias.lv "log --graph --all --pretty=%%Cred%%h%%x20%%Cgreen%%an%%Creset%%x20%%ar%%C(auto)%%d%%n%%s"
@REM Log (last 10 commits, current branch)
git config --global --unset alias.l
git config --global alias.l "log --oneline --decorate -10"
@REM Log (all branches)
git config --global --unset alias.la
git config --global alias.la "log --oneline --decorate --all --graph"
@REM Commit
git config --global --unset alias.c
git config --global alias.c "!git add -A; git commit -a -m"
@REM Amend
git config --global --unset alias.amend
git config --global alias.amend "!git add -A; git commit --no-edit --amend"
@REM Show aliases
git config --global --unset alias.alias
git config --global alias.alias "config --global --get-regexp alias"
@REM Push
git config --global --unset alias.up
git config --global alias.up "push origin HEAD"
@REM Pull
git config --global --unset alias.down
git config --global alias.down "pull origin --rebase"
@REM Show status
git config --global --unset alias.s
git config --global alias.s "status"
@REM View staged changes
git config --global --unset alias.df
git config --global alias.df "difftool -y HEAD"
@REM View changes made by last commit
git config --global --unset alias.changes
git config --global alias.changes "difftool -y HEAD~1 HEAD"
@REM Reset current branch to HEAD (drops uncommitted changes)
git config --global --unset alias.to-head
git config --global alias.to-head "reset --hard HEAD"
@REM Reset current branch to upstream HEAD (drops changes and commits)
git config --global --unset alias.to-upstream
git config --global alias.to-upstream "reset --hard origin/HEAD"
@REM Drop all changes and clean repository
git config --global --unset alias.ruin
git config --global alias.ruin "!git reset --hard origin/HEAD; git clean -xfd"