News for hackers. Stuff that matters.
Re:Things I wish everyone knew about Git (Part II) by OJFord on Wednesday July 20, 2022 @05:19AM (#32163270)
If I could just convince colleagues to `pull.rebase`, so CI isn't constantly building 'Merge branch master' on the master branch, I'd be happy enough.
Re:Things I wish everyone knew about Git (Part II) by planede on Wednesday July 20, 2022 @05:43AM (#32163418)
Uh, couldn't disagree more. I just discourage the use of pull itself, but having it and defaulting to rebase is quite invasive.
Re:Things I wish everyone knew about Git (Part II) by formerly_proven on Wednesday July 20, 2022 @05:31AM (#32163346)
Maybe it would have been good if the git defaults were changed from the defaults used for the kernel development workflow to the git workflow ~everyone else is using, even though git was created for the kernel people by the kernel people - most users are not kernel people.

"git pull" in the kernel workflow is for integrating downstream changes into your own upstream repository. Meanwhile, "git pull" in the everyman workflow is for synchronizing your local changes with upstream changes (you know, re-basing your patches on upstream or something).

Even the merge commits left behind by default git pull reveal this. "Merge branch master of ssh://yourorg-git/upstream" - completely backwards for what you are doing - you're merging the upstream into the downstream? What, your local repo is the boss now? Doesn't make any sense.

Re:Things I wish everyone knew about Git (Part II) by shikoba on Wednesday July 20, 2022 @05:59AM (#32163521)
The idea of "merging into" has no meaning with git. You're merging two things into one. But saying that there are a master thing and a slave thing has no meanings.
Re:Things I wish everyone knew about Git (Part II) by andreareina on Wednesday July 20, 2022 @06:07AM (#32163575)
git does privilege the first parent[1] in a merge in a bunch of contexts

[1] i.e. the branch you did the merge from

Re:Things I wish everyone knew about Git (Part II) by IshKebab on Wednesday July 20, 2022 @08:05AM (#32164531)
Not true because commit parents are ordered. One of them is first - the main parent.
Re:Things I wish everyone knew about Git (Part II) by shikoba on Wednesday July 20, 2022 @08:12AM (#32164610)
It's a detail. But for some people it looks like it changes everything.