News for hackers. Stuff that matters.
Re:Ask HN: What's the worst piece of software you use everyday? by modeless on Saturday July 11, 2020 @04:58PM (#23805897)

    git config pull.rebase true
    git config rebase.autoStash true
I think these should have been the defaults but they weren't implemented until later and it's hard to change defaults.
Re:Ask HN: What's the worst piece of software you use everyday? by hiyer on Saturday July 11, 2020 @07:15PM (#23807043)
Setting rebase to true by default is not a good idea if you push your code to your dev branch regularly (rather than just committing).
Re:Ask HN: What's the worst piece of software you use everyday? by teraflop on Saturday July 11, 2020 @07:50PM (#23807261)
I think that's a bit of an exaggeration; "pull.rebase=true" should be fine as long as you don't have local merge commits that need to be rebased on top of someone else's changes. With ordinary commits, it shouldn't really matter how frequently you (or others) push.
Re:Ask HN: What's the worst piece of software you use everyday? by Izkata on Sunday July 12, 2020 @03:06PM (#23813842)
"git rebase" has --preserve-merges (apparently renamed to --rebase-merges a few years ago) to recreate those local merge commits, maybe it can be set somehow for this as well?
Re:Ask HN: What's the worst piece of software you use everyday? by jgmarcel on Friday July 17, 2020 @12:11PM (#23872062)
Exactly. That’s the default I use. You can set it via:

    git config --global pull.rebase merges
Re:Ask HN: What's the worst piece of software you use everyday? by lordgrenville on Saturday July 11, 2020 @06:13PM (#23806591)
Great to know about these. I still think the current default is better: for a new user, it might be scary for your uncommitted changes to "vanish" into a stash.
Re:Ask HN: What's the worst piece of software you use everyday? by modeless on Saturday July 11, 2020 @06:16PM (#23806611)
The stash is popped before the command finishes, so your changes don't appear to vanish. Unless there's a conflict while rebasing a prior commit. Actually I'm not sure if aborting the rebase at that point would pop the autostash, but it should.
Re:Ask HN: What's the worst piece of software you use everyday? by lordgrenville on Saturday July 11, 2020 @06:32PM (#23806716)
Got it. In that case I agree.
Re:Ask HN: What's the worst piece of software you use everyday? by zyberzero on Saturday July 11, 2020 @05:51PM (#23806395)
TIL. Thank you for this!