10 ms·
Sincere question: what does Git have that makes easy to revert the change on your example that SVN doesn’t have? I barely know Git, that’s why I ask.
by cognomano 4y ago
Sincere question: what does Git have that makes easy to revert the change on your example that SVN doesn’t have? I barely know Git, that’s why I ask.
- tom_ 4y agoYou (or anybody) can use git revert to create a new commit that undoes previous commits: https://git-scm.com/docs/git-revert https://git-scm.com/docs/git-revert Perforce has something similar too: http://ftp.perforce.com/perforce/r16.2/doc/manuals/cmdref/p4_undo.html http://ftp.perforce.com/perforce/r16.2/doc/manuals/cmdref/p4...
- hibbelig 4y agoSven also has a command for reverting a commit, ie committing the inverse of a previous commit.
- Izkata 4y agoFor anyone looking for it, it's not as intuitive as git. In svn, you reverse-merge the commits from the current branch's history you want to revert: svn merge -c-123 . # single commit, the second "-" is "do the merge backwards" svn merge -r123:122 . # Multiple commits in reverse order, "the change going from 123 to 122" https://stackoverflow.com/questions/13330011/how-do-i-revert-an-svn-commit https://stackoverflow.com/questions/13330011/how-do-i-revert...
- chriswarbo 4y agoGit makes branching and merging easier, and the whole history is available locally. You can just ignore those buggy commits and base your work on an older version; when someone eventually fixes the bug, you can merge the bug and its fix into your changes, to become up-to-date (with the possibility of conflicts, but nothing is completely free ;) ).