4 ms·
> Do you have any suggestion for alternative systems, which uses this supposedly "real" git flow, paired with reviews? GitLab (I know it works, because I set u
by pritambaral 5y ago
> Do you have any suggestion for alternative systems, which uses this supposedly "real" git flow, paired with reviews?
GitLab (I know it works, because I set up this workflow in my company). Before GitLab: Phabricator, Gerrit.
> All the git operations you listed work perfectly fine locally on a repo from github ...
Irrelevant. GitHub needs to be compatible with Git, not the other way around. This subthread began with the assertion that GitHub wants to break that dependence.
> Gitlab works mostly the same as Github
False. GitLab lets me compare different versions of the same MR against each other. Without extra work. It's right there in the MR diff UI. That's literally what I wanted.
> ... for both of them you can configure the merge-strategy and PR requirements per repo.
Some configuration allowed. Not the same kinds. GitLab's squash-and-merge strategy actually works, even lets me set the commit message! GitHub built their incomplete implementation of sth similar only recently, to catch up with GitLab, but also stopped half-way. That last bit is what gives rise to the suspicion that started this thread: that GitHub doesn't really want to be Git-compatible and doesn't care about Git. GitLab, OTOH, introduced this feature, a long time ago, because it saw people were already using Git this way. I couldn't accept doing development in my company without some kind of auto-squash support.
> which is more based on single commits rather than branches and pull-requests, but in a way their refs/for/master is very similar to a PR except it doesn't have a branch-name
Gerrit has branch names, I don't know what you're talking about. In fact, it has better support than GitHub. I can push a locally created branch and ask for the branch to be reviewed, all from the `git` CLI. I can even change the branch name, push the new branch, delete the old branch (on remote, from local `git` CLI) and all of my changes and their reviews remain intact! The equivalent on GitHub would require me to close my current PR and open a whole new one!
> and you don't need to fork the repo first
This is a good thing. `git clone` is already a fork. I shouldn't have to make two forks, one of them through some external interface, and another through the `git` CLI, just to be able to work on sth. Git's branches are already excellent, there's no need for yet another way to keep separate versions of a repo.
> but under the hood you could say a patchset on a change is the same as a commit on a branch sent for PR.
No. I think your understanding not Git derives almost entirely, if not predominantly, from GitHub. And this is exactly what we're talking about in this thread. GitHub would like to impose their way of doing things on everyone, irrespective not what better ways exist (and have existed since before GitHub was born).
In Gerrit, each change is a commit on a branch. There are versions of commits, each of which is a patchset. This is good and desirable, because it leads to cleaner branches. I like this, I want this, and I've been using this since before GitHub was launched.
GitHub's only supported way is to create a commit for every tiny edit, irrespective of whether it's significant enough to be enshrined forever in the final branch as an independent commit of its own. This adds noise. Buncha commits with just the message 'Typo'. Ugh. Imagine running into one of these in a git blame, months later. Imagine looking at a git log. Just ugh.
And what's the alternative with GitHub? Squash all commits in a PR into a single one. So now I can't have more than one significant commit in the same PR. Okay, fine, whatever; can I at-least make one PR dependent on another one, like a commit that has a parent? Nope!
> In the end, they are all the same and you learn to work with it.
As I show above, they're not all the same. Can't learn to work with sth you need that's missing.
> None of them really fight against the core of git.
If I can just git push and git pull and get all my work done with just that, then yeah, none of them really fight against the core of git. But then why would I use them instead of a headless SSH server?
They all fight against Git, in different ways, when they decide to build custom UX for one workflow or the other. They're telling you what workflows they support. If your workflow can't fit into them, well then they can't do the job you want them to.
This is why both Gerrit and GitLab were built the way they are today: their users needed a certain workflow (feature) and they cared enough about those users that they grew to support such features. GitHub has ... other users ... it cares about more. Not the power users. But power users also are more likely to be defiant, to resist control.
- quadrifoliate 5y agoThank you for articulating my actual pain points with GitHub a whole lot better than I could have.
- Too 5y agoThe equivalent for fixing typos in a chain of commits in github is configure squash on merge, commit --fixup/--amend and finally push --force. Force pushing might ring some alarms and sound counter-intuitive, but as long as it's on an open PR that's not yet merged it's perfectly fine. In a way one could argue this is more git-native compared to Gerrits refs/for which does some server side processing of the Change-Id and whatnot to map it into one change. Biggest problem here is Githubs UI for indicating force-pushes is an abysmal line in the comment-list, instead of a showing all major updates to the branch in one place and mapping the comments to each of them. Just small remark that I personally much prefer the Gerrit model over Github, both UI and the git interaction :) Just don't see either as any big barrier or deviation from git workflow, as long as you stay away from the github client of course.
- pritambaral 5y ago> configure squash on merge This makes it one commit per PR. Undesirable. > commit --fixup/--amend I'm aware of these (and magit makes it seamless). The problem is with the force push that these necessitate. > Force pushing ... it's perfectly fine Not when it breaks the reviewers' process. > In a way one could argue this is more git-native compared to Gerrits refs/for which does some server side processing of the Change-Id and whatnot to map it into one change. It is that server-side mapping that allows comments and discussions on changes to carry over from one version to another. Unlike on GitHub, where I've had to re-raise the same comment after a force push. It sometimes feels like GitHub's treatment of force pushes make it a dark UX pattern to slip bugs by reviewers. This problem is big enough that I sometimes simply can't review a branch on GH. Unlike on GitLab, where I can be sure my comments, even when outdated, won't simply vanish. > Biggest problem here is Githubs UI for indicating force-pushes is an abysmal line in the comment-list, instead of a showing all major updates to the branch in one place and mapping the comments to each of them. For a platform whose main selling point was "Look, pointy-clicky web interface!", this is a major problem. The PR discussions interface sometimes feels like it hates the humans interacting with it. You better not ever let it get too long! Force pushes aren't the only thing it makes you hunt down, BTW. Got an old comment somewhere? Perhaps one that has been "outdated" by a force push (aside: this is server-side processing, BTW, and worse than Gerrit)? Well, good luck finding that in a sea of hidden comments. > Just don't see either as any big barrier or deviation from git workflow, 'Git workflow' is not the same as 'GitHub workflow'. GitHub doesn't currently mind you using them for the former, but they'd much rather you do things the latter way.