Last active
September 24, 2019 10:13
-
-
Save zivni/90a6a93fec678821ecc58f62742f7b8f to your computer and use it in GitHub Desktop.
some useful git aliases
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
git config --global alias.alias "config --get-regexp ^alias\." | |
git config --global alias.incoming '!git fetch && git log --pretty=format:"%C(yellow)%h\\ %ad\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short ..$1' | |
git config --global alias.mincoming '!git fetch && git log ..origin/master' | |
git config --global alias.outgoing 'cherry -v' | |
git config --global alias.l 'log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short' | |
git config --global alias.master 'checkout master' | |
git config --global alias.graph 'log --oneline --abbrev-commit --all --graph --decorate --color' | |
git config --global alias.view 'show --oneline --name-status' | |
git config --global alias.mine '!git log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | grep -F $(git config user.name) | less -r' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
About git alias
Git alias lets you set a short command name to some other complex git commands.
Description
git alias
- Show the configured aliases.git incoming origin/master
- Show what commits are about to be pulled from any branch.git mincoming
- Show what commits are about to be pulled from origin master (Shortcut for the above).git outgoing
orgit outgoing branch_name
- Shows what commits are not yet merged.git l
- Log the commits as one liners.git master
- Shortcut to checkout master.git graph
- show log as graph.git view d1592b88
- show files in a commit.git mine
- show your commits