svn merge (within the same branch)

Let’s say you work on a ‘pom.xml’ file that has been committed into svn at revision 22918. (0.22-SNAPSHOT)

Then you changed the pom.xml file and again committed at revision 22921. (0.222-SNAPSHOT)

Then you locally modified the pom.xml (0.2-SNAPSHOT) but you want to get the initial pom.xml (from revision 22918) and you want to check in this file:

svn merge -r HEAD:22918 pom.xml

then you get the conflict:

C pom.xml

and the following files:

svn st

? pom.xml.merge-left.r22921
? pom.xml.merge-right.r22918
? pom.xml.working
C pom.xml

the pom.xml:


<<<<<<< .working
>>>>>>> .merge-right.r22918


You correct the changes to have only :


save the pom.xml and tell svn that you resolved the conflict:

svn resolved

the commit the correct version

svn ci -m”proper 0.22-SNAPSHOT version”


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s