Replies: 44 comments 50 replies
-
Thank you for reporting this issue! Would you mind to provide a little bit more details to why rewriting git history on the master branch is a bad practice? Not that I don't know, but it would be good if you could add some arguments. |
Beta Was this translation helpful? Give feedback.
-
Because when you do so, you're actively destroying history. Which not only doesn't make sense, because one of SCM's main purposes is to preserve history, but it's even worse when you're destroying other people's history, too. Don't get me wrong, rewriting history is fine (and even encouraged) when you're doing it locally, on a separate branch you're working on and need to constantly clean up stuff, but once you merge it into your main branch and release it to the public, it's part of history now. And history, as we know it, is immutable (or, in this context, it should be). The official git documentation says it better:
In my opinion, the only valid reason to force-push commits to your main branch, is when you mistakenly commit sensitive information that must not be out in the public, which I don't think it's the case here. |
Beta Was this translation helpful? Give feedback.
-
As I understand things, the master git history is designed to be the ultimate source of truth for a project. There are many reasons to defend the integrity of this record. Allowing any history modification opens the door to malicious changes being slipped into the the software and then hidden. Search for 'xz supply chain attack' for an example of how complex such shenanigans can become. |
Beta Was this translation helpful? Give feedback.
-
Looool. 🤦♂️ Force-pushing to master breaks most standard git workflows. Rebasing becomes very hard. |
Beta Was this translation helpful? Give feedback.
-
Good practice is to protect master/main branch from direct commits and only accept pull requests |
Beta Was this translation helpful? Give feedback.
-
I'm guilty of abusing force pushes sometimes for small projects no one cares about, but please don't do it for xlibre. I understand force pushing in emergency situations but those were not it as far as I can tell. I bring this up since master was forced pushed again since this issue was opened. You only create more work for yourself and contributors since all the PRs go out of sync with the master branch. Either you have to go manually rebase the branch yourself or the contributor has to do it (e.g. I just did a rebase for my PR just now). I would highly suggest at least branch protection against force pushes on master to prevent this. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Just adding my 2 cents. Everyone who has a clone of the repository checked out locally can't do a simple |
Beta Was this translation helpful? Give feedback.
-
My thoughts after seeing this issue:
So yeah, trust issues will be created from this. |
Beta Was this translation helpful? Give feedback.
-
@metux: Why do you keep force pushing and rewriting history? It just happened again. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Metux answered that here: X11Libre/xserver#394 (comment) but I dont get it |
Beta Was this translation helpful? Give feedback.
-
His reasons don't make any sense to me either. Maybe he just couldn't express himself well. He says he force pushes "in order to have a cleaner history", but I don't understand how the git history in |
Beta Was this translation helpful? Give feedback.
-
Please have a look at the history how it is right now: master is a direct descendant (w/o any merges) of maint-25.0. Later when we're doing another release from master, then looking at that one's history will show it's based (almost) directly on the 25.0.0.x bugfix release at the time the master release had been made. The few bugfixes we might have to do in 25.0.0.x after that then have to be cherry-pick'ed, but these (hopefully) will be rare. Downside: we sometimes have to rebase some PR branches, as github's getting confused (since it's not recording the point-of-fork at push time, but always looking at what's currently the last common ancestor). Alternative a) Alternative b) Summing it all up, IMHO the current approach is the lesser evil here. |
Beta Was this translation helpful? Give feedback.
-
please see my other reply - hope that's clearing it up a bit |
Beta Was this translation helpful? Give feedback.
-
@Dudemanguy dang dude don't blame the guy for continuing to work just because y'all decided what the outcome should be. Maybe he's head-down obsessed with doing whatever he's doing and he doesn't want to change his ways just yet. Time will tell. Maybe this project will go nowhere and we'll look forward to your own expertly managed fork. At the very least, the behavior was explained and it's not really that suspicious for some developer to use or misuse a tool compared to whatever perceived normality exists. I'd bet that he views all of the issues that people are coming at him with suspicion as well because they're not "the core thing" and just trolls or minor distractions. Some people are better engineers than they are managers. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The problem is that his workflow actively breaks everyone else's branches for no good reason. At the very least, I consider that rude and the fact that he definitely discounted what everyone said by force pushing again after replying in this thread more than warrants my response imo. And sure he dropped one comment explaining why in the thread but to anyone else not aware, the huge history of force pushes in this repository would be concerning. |
Beta Was this translation helpful? Give feedback.
-
I'm actual git developer, who started using in 2005, so I know how it's meant to be used and I have to say there's a lot of misinformation in this thread. @Dudemanguy said:
Nobody forced you to rebase. Do you know you can request a pull from a base that is not the tip of the master branch? That's the whole reason git is a distributed version control system: so changes in one repository don't affect your personal repository.
Wrong. There's no extra work for the contributors, because they are not forced to rebase. And the flipside is actually very big. I spent several days trying to figure out which commits from Xorg's master branch were not in the stable branch, all because they are following the model you suggest. I'm not going to claim @metux current model is necessarily better, but as I maintainer I 100% understand why it makes things easier for him. On the other hand take a look at Xorg's "standard" model, they have not made a release in 4 years, precisely because their master branch is not clean, and therefore not easy make a release out of it.
If GitHub users don't know how to properly use git, I say screw them and only accept patches through the mailing list. People who know how to send patches through email generally know how to use git.
This shows beyond a shadow of a doubt you don't understand how git works. Rebasing does not change the code tree, so why would that break your patch?
It's not big, it's just stupid.
Have you heard of Linus Torvalds, the creator of git? He explicitly tells people to not to base their patches on his master branch, precisely because it's constantly changing. So no, I think this is just a git skill issue. If people who don't understand how git works are going to complain about a moving This will force contributors to avoid the moving branch for their patches and maintainers to do minor releases more often to avoid fixing merge conflicts. |
Beta Was this translation helpful? Give feedback.
-
I'm locking this conversation due to being too heated until 2025-07-21 12:00 UTC. I wish you all a nice weekend and maybe there will be a chance to relax a little and put your minds at rest. Enjoy and see you Monday. @felipec I am anything but happy with your tone and will contact you by e-mail. |
Beta Was this translation helpful? Give feedback.
-
Quoting X11Libre/xserver#394 (comment):
|
Beta Was this translation helpful? Give feedback.
-
Quoting X11Libre/xserver#394 (comment):
|
Beta Was this translation helpful? Give feedback.
-
In the next step this will be moved to X11Libre General · Discussions · GitHub and and any remaining concerns will be asked about. |
Beta Was this translation helpful? Give feedback.
-
I believe this issue is closed, because I've already agreed not to rebase master branch anymore for quite some time now. |
Beta Was this translation helpful? Give feedback.
-
@callmetango on my machine I always do @Dudemanguy that is not true, there's absolutely nothing that prevents a maintainer from merging such a branch. However, ideally people should base their development on the latest tag (e.g. That's why I suggested to rename |
Beta Was this translation helpful? Give feedback.
-
I think I'm slowly getting where you're trying to go with this but I'm not involved in Linux kernel development so maybe lacking some context. My questions:
|
Beta Was this translation helpful? Give feedback.
-
I'd suggest everyone to stop engaging with whatever lunacy Felipe Contreras says, because he's clearly a certified troll. I'll just quote Linus Torvalds' literal words about rewriting public git history, back in 2009:
He then explains it further:
Clearly not that straightforward to some people, Linus. |
Beta Was this translation helpful? Give feedback.
-
This thread made me hate git even more :) . |
Beta Was this translation helpful? Give feedback.
-
As stated in https://github.com/orgs/X11Libre/discussions/243#discussioncomment-13882031 I'm taking the task and will work on Create a Git branching and overall release strategy · Issue #281 · X11Libre/misc in it's associated discussion Create a Git branching and overall release strategy · X11Libre · Discussion #282. This discussion will be kept open until the open questions above have been answered. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature
Every day I look at the commit activity of this project, and every day the commits timestamp is very recent.
But that's just an illusion, because I noticed that most (if not all) of these commits are old, and just have their date modified to appear recent:
https://github.com/X11Libre/xserver/activity?ref=master&activity_type=force_push
Is there a valid reason for that? If there's not, can you please add a protection to the
master
branch to prevent force-pushes?It should be implemented because
Rewriting git history on the
master
branch is a bad practice.What are the alternatives?
No response
Additional context
No response
Extra fields
Beta Was this translation helpful? Give feedback.
All reactions