Live data from Hacker News

How Core Git Developers Configure Git

blog.gitbutler.com

61–70 of 129 posts

Re: How Core Git Developers Configure Git

#61
post #9

How much of this is for a noob like me that just uses vscode? I hardly ever see the git command line, and when I do see it, its trouble beyond what anybody can fix...

VSCode git interface is actually pretty powerful, 99.9% of the git actions I do are already covered there, including merging, stashing, tagging, getting output from the git hooks...

However changing the diff algorithm is still a nice one, both for solving conflicts and to avoid the ocassional bad automated merges (the latter is scarier as you don't even know you pushed something wrong).

Re: How Core Git Developers Configure Git

#62
Mine is here [1], I basically had all of these set already (other than column ui which I don't like), but I suspect that's just because I've probably previously read nice posts by Scott and others talking about them.

Maybe trading alias tips is another useful thing to do though, hence sharing the link.

[1]: https://github.com/Julian/dotfiles/blob/main/.config/git/con...

Re: How Core Git Developers Configure Git

#63
post #25

Why is git even in development? It's exactly the same like 15 years ago, right? ... right?

Most of the items in this list were introduced more recently (a lot from '22) and are definite quality of life improvements. But sure, the core of Git remains mostly unchanged - the 'porcelain', if you will - although the one major change is that they're changing the default hashing algorithm (I'm not sure if this has been done yet, I know it was decided upon in 2018).

Re: How Core Git Developers Configure Git

#64

Earlier quoted context omitted.

After using delta for a while, I'm going back to the regular diff view... it's not that it isn't good, but I'm constantly copying diffs (yes, I know I can generate patches) and the pretty output breaks that workflow. Also, when your terminal is a bit small it's a bit hard to see things. But it's really good software, I recommend anyone who's reading to give it a try.

IIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.

Wow I never knew this, I always just type `--no-ext-diff` when piping the output. Thanks!

Re: How Core Git Developers Configure Git

#66

Earlier quoted context omitted.

IIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.

Wow I never knew this, I always just type `--no-ext-diff` when piping the output. Thanks!

`... | cat` is sometimes really handy (and universal)

Re: How Core Git Developers Configure Git

#68
post #35

While everyone is here considering their life choices (at least as far as they relate to ~/.gitconfig), highly recommend delta [1] as a companion to the git cli. [1]: https://dandavison.github.io/delta/

If you’re an emacser, you can even use delta with magit via the same author’s magit-delta package: https://github.com/dandavison/magit-delta

Looks like there are also instructions in the docs for using it with vscode

Re: How Core Git Developers Configure Git

#69

Earlier quoted context omitted.

IIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.

I... did not know that! Yep yep that should do the trick for me. Thanks a lot, actually!

Most tools that do formatted output, if they’re well-behaved, should try to detect if their output is a pipe and if so, disable formatting.

Some examples that I can think of off the top of my head (in addition to git) are ripgrep and jq, both of which do the right thing and strip formatting.

Re: How Core Git Developers Configure Git

#70

Earlier quoted context omitted.

Of course, there's an xkcd for that : https://xkcd.com/1597/

Should create an XKCD with “There is always n+1 Git client GUI”. EVERY new employee arrives saying “Hey I’ve found this great UI for git, this one really nails it and makes git easy” and every time it’s a new Git UI that I’ve never heard of. It’s the “hello world” of startups: Creat their great git UI and publish it. Then they commit with the default crappy commit messages and they don’t know how to git-rebase-i.

Maybe git is just too complicated for average users (myself included).
Post reply on HN