I accidentally pushed some changes to the main branch which weren't ready, so I immediately did a backout. Later I tried merging new changes from the trunk into my branch, but the merge didn't work very well. In particular, it seemed that it thought the backout meant that I wanted all of my changes undone. Fortunately, none of the files that I had modified were modified by the changes on the main branch, so I could just revert the files to local, but if there had been conflicts, this would have been messy. Was backing out the right thing to do in this situation, or is there something else I could have done to avoid potential conflicts later.
+2
A:
You wanted rollback
not backout
. Rollback is a one-level undo of the last pull (or received push) or commit. Backout, applies the inverse of the changeset you specify.
If, for example, you do a commit and realize you had a typo in the commit message you can rollback
(provided you've done no other pulls or commits. If, on the other hand, you realize that your new thread scheduler was a bad choice and you want to undo it, then you do a backout, so that the history reflects the path you went down and decided against -- because that's valuable info too.
If you want to undo a push, you need to login to the receiving side and do the rollback there.
Ry4an
2010-09-08 02:42:45