Live data from Hacker News

Git log – The good parts

zwischenzugs.com

11–20 of 86 posts

Re: Git log – The good parts

#11
post #8

Or use sourcetree

Sourcetree is awful and slow. There is git gui by default, which is not perfect but IMO better that cli. I actually use Git Extensions for years now and could not find anything better.

Re: Git log – The good parts

#12
post #11
post #8

Or use sourcetree

Sourcetree is awful and slow. There is git gui by default, which is not perfect but IMO better that cli. I actually use Git Extensions for years now and could not find anything better.

Which Git GUI present by default do you find better than CLI? gitk? Or do you have something else in mind?

Re: Git log – The good parts

#14

Quote from article: "Remember that your version might do --all by default when output goes to the terminal instead of a file" Which version of Git does --all by default?

I think they meant to say "might do --decorate by default" (which Git does since v2.13.0).

Re: Git log – The good parts

#15
post #3

I would recommend tig for anyone looking for a cli git repo browser: https://jonas.github.io/tig/ Then there's no need to mess with git log and all its options.

Second that, I love tig as a history browser. However for Git tree manipulation I find it a little disappointing. A lot can be customised with shortcuts, but it feels a little cumbersome and you need to restart for some changes to be visible.

Re: Git log – The good parts

#17
post #6

For those increasingly rare times I'm not using Magit[0], I have a "git lg" alias I found once through HN[1]: git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) %Creset' --abbrev-commit" I strongly recommend both. -- [0] - https://magit.vc/ [1] - https://coderwall.com/p/euwpig/a-better-git-log

You should probably avoid `--color`, as it turns on color unconditionally, even if output is going to a file. In older versions of Git the %C color placeholders were unconditional anyway. In modern Git, they respect the normal auto-coloring settings.

You can also drop `--abbrev-commit`, since `%h` abbreviates by default (use `%H` if you want the full hash).

Re: Git log – The good parts

#18

Quote from article: "Remember that your version might do --all by default when output goes to the terminal instead of a file" Which version of Git does --all by default?

The ones distributed in Ubuntu and MinGW do. Probably many others as well.

EDIT: Or not. It's off by default actually.

Re: Git log – The good parts

#20

Quote from article: "Remember that your version might do --all by default when output goes to the terminal instead of a file" Which version of Git does --all by default?

The ones distributed in Ubuntu and MinGW do. Probably many others as well. EDIT: Or not. It's off by default actually.

Which version of Ubuntu? The last time I checked, --all was not enabled by default in Ubuntu? Can someone confirm if this is indeed true?

If this is indeed true, how do they achieve this? Do they modify git source code to achieve this?

Post reply on HN