Live data from Hacker News

Git commands I run before reading any code

piechowski.io

431–440 of 546 posts

Re: Git commands I run before reading any code

#432

Earlier quoted context omitted.

JJ can save conflict related state with the change so that you don't need to resolve a conflict in the middle of a stack of changes for rebasing to continue for the remaining changes. Concretely, it uses a "conflict algebra" where it can track the impact of a conflict as it propagates through the stack of rebased changes: https://docs.jj-vcs.dev/latest/technical/conflicts/

That sounds like https://git-scm.com/book/en/v2/Git-Tools-Rerere ?

Not really very similar at all for the scenario discussed here. Rerere remembers how you have resolved a conflict before. It doesn't let you rebase a stack of commits that result in different conflicts. You will have to stop and resolve each conflict and then `git rebase --continue`.

However, the conflict algebra does remove many common uses of rerere. See https://github.com/jj-vcs/jj/issues/175#issuecomment-1079831... for a longer discussion.

Re: Git commands I run before reading any code

#433
post #165

Earlier quoted context omitted.

In my case, it's .github/CODEOWNERS. Nobody is afraid of changing it.

Why does github owners need frequent change? Do members in you team change so often?

If it works like gitlab (which a quick search looks like yes), you can specify down to individual files and use it to automatically determine who needs to approve merge requests.

Re: Git commands I run before reading any code

#434
post #324

Earlier quoted context omitted.

It's totally compatible though, and that's a big selling point. I use jj and nobody else at my work uses it and that has never been an issue.

I think the "incompatible" was more in the dvorak sense, which I believe is that whenever you are on another computer, it most likely won't have dvorak. For jujutsu, it's fine on your own computer, but you probably have to use git in the CI or on remote servers. And you probably started with git, so moving to jujutsu was an added effort (similar to dvorak).

>I think the "incompatible" was more in the dvorak sense, which I believe is that whenever you are on another computer, it most likely won't have dvorak.

That's not a problem, just switch to Qwerty when you use a different computer. For me at least, it's not hard at all to switch between Dvorak and Qwerty.

Re: Git commands I run before reading any code

#435
post #405
post #347

Earlier quoted context omitted.

That is a fair argument. I don't know why they dropped out of favour - price? Noise?

Most people and companies just use the keyboard that shipped with the computer. I don't think noise is as much of an issue as people make it out be. Marketing made up this story about linear switches being for gamers. So now every mechanical keyboard needs to make unnecessary noise and offer extra resistance for harder bottom out or you're not a serious typist. But that's not inherent to the keyboard. Linear switches…

I'm not a gamer these days, but from what I've seen, the gamers like a different type of keyswitch than regular typists. Normal typists like a clicky keyswitch where it clicks with very little travel, and has plenty of travel after this to avoid bottoming out. (so, Cherry blue)

Gamers want mechanical keyswitches with no click at all. (Cherry brown I think)

Re: Git commands I run before reading any code

#436
post #179

Trusting the messages to contain specific keywords seems optimistic. I don't think I used "emergency" or "hotfix" ever. "Revert" is some times automatically created by some tools (E.g. un-merging a PR).

For the stuff I've worked on, if you want to know about bugfixes and emergency releases, you'd go to Jira where those values are formalized as fields. Someone else in the comments here had a suggestion which just looks for the word "fix" which would definitely capture some bugfix releases, but is more likely to catch fixes that were done during development of a feature.

Yes for a meaningful context you should need both the source repo and the work tracking system. But today most systems have apis (jira, ADO, gh, ...) so this should be fairly doable, especially using a bot like copilot cli. But it's not doable as a little shell script.

Re: Git commands I run before reading any code

#438

Earlier quoted context omitted.

The author does not look at counter values but rather at how the values changes. That reveals dynamics.

My comment still seems relevant? Do frequent commits to correct mistakes imply more "value" than infrequent, but well tested, commits, or what? I don't think it is a reliable signal.

I agree with you. Also, there is people (like me) that like to small commits (that don't break stuf) instead of huge mega commits. If I do something like small broken/wip commits, are only under my working bramch and I do a interactive rebase to merge on good cohesive commits.

Re: Git commands I run before reading any code

#439
post #365

Earlier quoted context omitted.

I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice. That said, the OP's commands are…

I don't even think git cli UX is that bad. Didn't git pioneer this sub-command style? Much better than like e.g. ffmpeg. Sure some aspects are confusing. I still don't understand why `checkout` is both for changing branches and clearing uncommitted changes. But overall I think the tool is amazing. I've not observed a bug in git once.

`git change` can switch branches too if thats easier to grasp :)

Re: Git commands I run before reading any code

#440
post #324

Earlier quoted context omitted.

I think the "incompatible" was more in the dvorak sense, which I believe is that whenever you are on another computer, it most likely won't have dvorak. For jujutsu, it's fine on your own computer, but you probably have to use git in the CI or on remote servers. And you probably started with git, so moving to jujutsu was an added effort (similar to dvorak).

>I think the "incompatible" was more in the dvorak sense, which I believe is that whenever you are on another computer, it most likely won't have dvorak. That's not a problem, just switch to Qwerty when you use a different computer. For me at least, it's not hard at all to switch between Dvorak and Qwerty.

> For me at least, it's not hard at all to switch between Dvorak and Qwerty.

Sure, but you had to learn both. And what benefit did you get from learning Dvorak?

I feel the same with jujutsu: I have to learn it on top of git, and I don't see a lot of benefits from knowing it.

Post reply on HN