Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Command line aliases configuration file for https://github.com/manekovskiy/aliaser utility
alias notepad %ConEmuBaseDir%\Scripts\aliases.txt
.. cd..
## GIT aliases
# List commits in short form, with colors and branch/tag annotations
gls git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate $*
# List commits showing changed files
gll git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --numstat $*
# List oneline commits showing dates
gld git log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --date=relative $*
# List oneline commits showing relative dates
glds git log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --date=short $*
# Short git log
gle git log --oneline --decorate $*
# All the commits related to a file
gfl git log -u $*
# Show modified files in last commit
gdl git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --numstat -1
# Status
gst git status
# New branch
gcb git checkout -b $*
# Add all and commit
gcm git add -A && git commit
# Save progress to SAVEPOINT commit
gsv git add -A && git commit -m SAVEPOINT
# Resume work
grs git reset HEAD~1 --mixed
# Amend commit
gam git commit -a --amend
# Checkout
gc git checkout $*
# Checkout master
gm git checkout master
# Rebase
grb git rebase -i $*
# Rebase interactively against master
grbm git rebase -i master
# Pull
gpl git pull
# Push
gp git push $*
# Push origin
gpo git push origin $*
# Clean
clr git commit -a --allow-empty -m BEFORE_CLEAN && git reset HEAD~ --hard && git clean -xfd -e .gen -e gen -e .packages -e .vs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment