3 ms·
I am utterly flummoxed by the idea of a version control system that autonomously discards versions at all, even if it keeps them in a mysterious trashcan for 90
by twic 13y ago
I am utterly flummoxed by the idea of a version control system that autonomously discards versions at all, even if it keeps them in a mysterious trashcan for 90 days.
Last week, some colleagues of mine 'lost' some commits because some other colleagues had misused a forced push. They could probably have got them out of the reflog, if someone had told them about the reflog in time; before i could, they recovered a diff from their console history. If they'd been using Mercurial, the situation just wouldn't have arisen; they would have had a branch with two heads, and they could have resolved that straightforwardly.
The fact that is would possible to recover from this situation using a command that one never has any other need to even know about is no excuse for the fact that it is even possible.
- taspeotis 13y ago> some other colleagues had misused a forced push Git has a learning curve. Atlassian Stash comes with a plugin that exposes a "Disable Force Push" toggle. I have that on for all the repositories it hosts. Nobody complains that force push doesn't work (~10 devs) because if you're doing force push you're probably doing something wrong.
- twic 13y ago>> some other colleagues had misused a forced push > Git has a learning curve. That sounds a bit like a euphemism for "is hard to use". However, that's not what i'm getting at. The first pair of people misused a forced push because they're clowns. They are never going to learn to use any version control system properly, even if the learning curve was down a slide. If we disabled force push, they'd probably have reenabled it (they're sysadmins, so it would be hard to stop them). The problem is that the second pair of developers, who are not clowns, but are also not Git power users, nor have any interest in becoming Git power users, got screwed by the first pair's mistake, and could only have got out of it by using an obscure feature known only to Git power users.
- Skinney 13y ago> and could only have got out of it by using an obscure feature known only to Git power users. Obscure? I spent one afternoon reading the Pro Git book that is available free online. The first thing you learn, after learning to alter history, is the reflog. Look, everything people in our business do is based on trust. It's fairly easy to mess up for everyone, and this includes Mercurial as well. Like switching bookmarks around or messing with hg strip.
- Skinney 13y ago> If they'd been using Mercurial, the situation just wouldn't have arisen; they would have had a branch with two heads, and they could have resolved that straightforwardly. The would have this situation in Git too. If the Git-server was setup to only allow fast-forward merges, then they wouldn't be able (little uncertain here) to force it through either. Forcing something is never a good idea, even in Hg. > The fact that is would possible to recover from this situation using a command that one never has any other need to even know about is no excuse for the fact that it is even possible. So... Git provides a feature, allowing you to clean up history before merging (what it is mostly used for anyway). Git even provides an option to recover from these changes... And you're upset because colleagues of you who apparently didn't know Git, fucked up?