4 ms·
I think git has made it easier to clean up code secure in the knowledge that we really can get the old code back in all its crufty glory if we really must.
by rfreytag 11y ago
I think git has made it easier to clean up code secure in the knowledge that we really can get the old code back in all its crufty glory if we really must.
- slavik81 11y agoThe people downvoting this probably haven't worked with version control systems in which it's actually really difficult to get the old versions of files. You'd think that it would always be easy, but you would be wrong. I used to use AccuRev, and it had a number of real problems in bringing back old code. Retrieving old code was possible, but required creating 'history streams' on the project and you basically had to do a whole new checkout into a new workspace. The commands that worked with history were also sometimes rather sketchy. There was always a question 'will a revert actually succeed?' It was much safer to manually undo changes. I never realized how painful it was to retrieve old code in that system, because I simply never bothered to do so. We designed our workflows around not having to do that. When I first learned git and discovered you could just grab an old file with git checkout <revision> -- <filename> I was shocked. I'd never really thought about my version control system before. I just used what I was given. But, at that moment, I realized that I'd been working with a terrible system for years.
- taneq 11y agoWhich version control systems are these? All the usual suspects make this easy - in fact I find git to be somewhat more difficult than other simpler tools like cvs or svn. Even (shudder) Visual SourceSafe offers this functionality.
- adrianN 11y agoThere are still version control systems around that don't have the concept of a commit of multiple files, Rational ClearCase for example. So if your change involves multiple files, undoing it requires remembering which files where involved and undoing each one separately. That's quite a pain, especially if you delete whole files that you want to have back.
- kruczek 11y agoYep, especially since ClearCase records adding/removing files not only as a change to these files themselves, but also as a completely separate change to the parent directory. Really terrible system.
- deleted 11y ago[deleted]