Returning after a merger, bad idea?

I am new to subversion. I recently did some development in two different branches, where one of the branches was a branch of the other branch. I combined some changes from the first branch to the trunk. However, trying to merge changes from another branch to the trunk, everything went wrong. That is, I had many conflicts, some of which I resolved (but did not commit), and some of them did not. Even worse, many of the changes that I made to the industry for some reason did not merge with the trunk. Now, my only question is, can I just make a return to my working copy to restore the trunk to its previous state? That is, I ruined something by doing this? I was taught to start all over and do it more thoroughly "manually."

Thanx!

+3
source share
4 answers

As long as you always merge only into a clean and fresh updated working copy, you can always refuse the merge by returning all the changes made by the merge (plus the ones you made to resolve the conflicts).
Just remember to never try to merge into a working copy with incomplete changes.

To minimize merge conflicts you want

  • do one merge at a time (if for some reason you want to make several merges on one, you can create a temporary copy of the merge target, merge several branches into it, merge them back into the merge target and delete it later.)
  • First, merging changes from the trunk into the branch, eliminating all conflicts that arise.
  • ( , ) svn merge --reintegrate
  • , ,
+5

, - , . Reverting , ( ). , , .

, : .

sbi, , svn .

+2

, .

, .

+1

, reset , . , , . ( ). Revert - , .

, , , : . , .

, , ( - "", ). , TortoiseSVN:

  • ( )
  • Tortoise .
  • , (, ), " ".
  • , .

To avoid this problem, you should probably merge the changes from the second branch back to the first branch and merge the changes from the first branch to the trunk. If this is not the way you wanted to work, you probably should have created a second branch from the trunk, and not from the first branch. The easiest way to integrate with where you separated.

0
source

Source: https://habr.com/ru/post/1743456/


All Articles