Live data from Hacker News

How Core Git Developers Configure Git

blog.gitbutler.com

21–30 of 129 posts

Re: How Core Git Developers Configure Git

#22

> Default branch > Personally, I don’t have a problem with master > updating the default value. I wish Git had some taste here, but they don't So author has no preference, but git does not have a good taste here, for not breaking backward compatibility. Typical passive agresive bullshit! I think "main" is not inclusive enough, we should use something like "non-specific-but-strong-branch". Or something that includes e…

While your comment is in jest, I agree with the sentiment. The whole "main" debacle sucks and, to this day, still breaks everyone's git usage.

Honest question: What has it broken about your git usage? I haven’t really noticed a problem.

Sometimes a repo uses “main” and sometimes “master”. It’s not like “master” was the only option before

Re: How Core Git Developers Configure Git

#23
That was a useful read. I'd been frustrated by `merge.conflictstyle = diff3` so I'm glad I learned about `zdiff3`.

I also discovered `fetch.prune` and `pull.autoSetupRemote` which will slightly enhance my workflow.

My only disagreement is with the diff prefixes. I prefer to display one path starting with ".", so that I can double-click it and paste it. So I don't want contextual prefixes, I'll keep my `diff.dstPrefix = ./`.

Re: How Core Git Developers Configure Git

#24

Earlier quoted context omitted.

While your comment is in jest, I agree with the sentiment. The whole "main" debacle sucks and, to this day, still breaks everyone's git usage.

Honest question: What has it broken about your git usage? I haven’t really noticed a problem. Sometimes a repo uses “main” and sometimes “master”. It’s not like “master” was the only option before

Previous shortcuts (dotfiles) which performed merges and other operations no longer work, as you never know if the project uses one branch name or the other.

And there's a whole new breed of programmers out there who feel offended on behalf of others about renaming versus not renaming, for example, the word "robot" comes from slave in Slavic languages and it should be banned, etc.

I somewhat agree with either banning all potentially offensive words or none at all, so let's go with none? Otherwise git is now simply gatekeeping offensiveness, and that's absurd.

Re: How Core Git Developers Configure Git

#27
My own ~/.gitconfig looks like this:

    [alias]
     co = checkout
     ci = commit
     st = status
     br = branch
     hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
     type = cat-file -t
     dump = cat-file -p
     dft = difftool
    [tag]
     sort = version:refname
    [tar "tar.xz"]
     command = xz -c
    [tar "tar.zst"]
     command = zstd -T0 -c
    [log]
     date = iso-local
    [pull]
     ff = only
    [diff]
     tool = difftastic
    [safe]
     directory = *
    [advice]
     detachedHead = false
    [init]
     defaultBranch = master

Re: How Core Git Developers Configure Git

#28

> Default branch > Personally, I don’t have a problem with master > updating the default value. I wish Git had some taste here, but they don't So author has no preference, but git does not have a good taste here, for not breaking backward compatibility. Typical passive agresive bullshit! I think "main" is not inclusive enough, we should use something like "non-specific-but-strong-branch". Or something that includes e…

While your comment is in jest, I agree with the sentiment. The whole "main" debacle sucks and, to this day, still breaks everyone's git usage.

I do not care about github, they can rename their domain to "smarthub.com", and force all users to migrate!

I do care if someone tries to push this stuff onto me. Changes in Git defaults would break 20 years of compatibility! It is bloody important in Linux development!

And I find it very moronic, that someone who writes "git" on every second line, complains "master" was not renamed.

Re: How Core Git Developers Configure Git

#29
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...

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.

Re: How Core Git Developers Configure Git

#30
post #27

My own ~/.gitconfig looks like this: [alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short type = cat-file -t dump = cat-file -p dft = difftool [tag] sort = version:refname [tar "tar.xz"] command = xz -c [tar "tar.zst"] command = zstd -T0 -c [log] date = iso-local [pull] ff = only [diff] tool = difftastic [safe] directory = * [advice] detachedH…

Shortened aliases come from cvs/svn land, sorting tags by a logical manner, adding some extra archive types for "git archive", making it so git log always shows my local time zone, pull will never do a non-ff merge, make it so Git doesn't complain about repositories in places it doesn't like, turning off an annoying message about a detached HEAD state, and shut git up about the default branch.
Post reply on HN