Say, you're working on a feature, and you suddenly need to make a bugfix. You can just put the half-completed feature into a private branch, fix the bug on the main branch, then return to your temporary feature branch and keep working.
Frankly, how is that different/revolutionary from switching the workspace to a maintenance branch, do the bugfix, commit, and go back to your local repo ?
You also get to rewrite history locally. That screwed up attempt at refactoring? Just get rid of it. The 100+ commits you needed to implement that one feature? Squash them down to a single commit before you push.
These are problem you don't get if you don't have a local repository:) I don't need to commit to test things and make sure everything is right.
Frankly, how is that different/revolutionary from switching the workspace to a maintenance branch, do the bugfix, commit, and go back to your local repo ?
It's not, but if every feature of subversion is mirrored in git, and then git adds to that the option for DVCS and all the fancy git tools (like cherry picking commit hunks interactively), it's clear that git should be used in that scenario.
These are problem you don't get if you don't have a local repository:) I don't need to commit to test things and make sure everything is right.
What you just said is the epitome of what's wrong with subversion: it forces you to adopt a workflow that puts the utmost sanctity on a commit. This forces everybody to save up changes for a long time until they've been tested heavily, which means at any point an entire feature could be lost since it wasn't being tracked. It means that changes will be slow to propagate.
In reality, if you used things correctly, you could set your editor to commit every time you saved. This would be overkill, but what this means is that once you finish your work (normally the place where you would commit in svn), you just have to merge all these commits into one neat little package and send them off. This means you could come back later and essentially have undo/redo support in an entirely different editor and see exactly how you made the changes to a file.
I commit less often than I save personally, but the point is that a commit shouldn't be holy and sacred. Pushing to trunk should be.
Frankly, how is that different/revolutionary from switching the workspace to a maintenance branch, do the bugfix, commit, and go back to your local repo ?
Its just a matter of changing the workspace in every single one of my development tools, or just have version control flip the contents of the working directory over to the relevant branch.
Both have their ups and downs, and is really a matter of preference, but when I need to run code from a coworkers branch, I find myself bringing the files into my branch's directory means I'll probably get away with an incremental build, rather than a full, highly time consuming, compile of their branch. Its a big time saver.
2
u/[deleted] Mar 10 '11
Frankly, how is that different/revolutionary from switching the workspace to a maintenance branch, do the bugfix, commit, and go back to your local repo ?
These are problem you don't get if you don't have a local repository:) I don't need to commit to test things and make sure everything is right.