Following up yesterday's post, here goes another set of tricks I have done to my GIT setup.
To begin with, add this code to yhe .git/config file of your git repo clone:
This file contains 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
[user] | |
name = Your Full Name | |
email = youremail@somemail.com | |
[alias] | |
conflicts = diff --name-only --diff-filter=U | |
st = status -s | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log --color --graph --pretty=format:'%h %C(blue)(%cr) %C(bold blue)<%an>%C(reset)%C(red)%d%C(reset) %s' --abbrev-commit -- | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = blue bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
whitespace = red reverse | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[color] | |
ui = true |
Once you do that, you'll see things like colors when running a "git status":

You'lll also be able to use git command shortcuts, like:
- "git st" instead of "git status"
- "git ci" instead of "git commit"
(etc!)
Logs will look much more sexy and colorful.
You'll see diffs with colors and with a much more user-friendly format:

When running "git branch", you'll see the current branch highlighted and the local branches clearly marked in yellow:

And remote branches in green:
That's all for today, folks!
Cheers!