git config powerup with aliases diff log

overview of the history of the newspaper git

Add this alias then try git l, ideally in a multi-user project with a lot of hookup and merge:

# command (that's why the aliases are rock!)
$ git log –graph –pretty = format:% C (yellow)% h% C (cyan)% d% Creset% s% C (white) -% an,% ar% Creset & # 39;
# create an alias via shell
$ git config –global alias.l "log –graph –pretty = format:% C (yellow)% h% C (cyan)% d% Crescent% s% C (white) -% year ,% ar% Creset & # 39; "
# or add directly to ~ / .gitconfig under [alias]:
l = log –graph –pretty = format:% C (yellow)% h% C (cyan)% d% Creset% s% C (white) -% an,% ar% Creset & # 39;

You get an abbreviated commit hash (ideal to paste in diff git etc), branch and remote information, commit message, author and relative date, in a compact format. And he graphically shows the branches via the madness of the railway diagram. ASCII-art FTW!

git config powerup with aliases diff log git log brings the awesum

I first used a too colorful version but this is based on that of Ben Hoskins in Git for busy people: see what you do .

detailed history of git log

While the previous alias has solved my first three needs, I still want to see what has changed and how much. This next command gives the same information as the default git log, but adds a list of each file modified by commit, and an indication of the amount of each modified file. I alias for git ll.

# order
$ git log –stat –abbrev-commit
# create an alias via shell
$ git config alias.ll log –stat –abbrev-commit
# or add directly to ~. / gitconfig under [alias] ll = log –stat –abbrev-commit

1519210719 710 git config powerup with aliases diff log Indicates how each file changed in a commit – the greener ones are insertions, the less red ones are deletions

It's handy to see which commits involve major changes or have affected a lot of files.

Load More Related Articles
Load More By Amit Ghosh
Load More In CSS Tricks

Leave a Reply

Your email address will not be published. Required fields are marked *