June 28, 2011

SVN Merge Command

There have been multiple times when I needed to merge changes from a branch onto trunk and I used the "svn merge" command. But for the life of me I can't remember the syntax and spend an hour in activities like cursing myself, trying to recall the command, researching it on the web, etc. Finally I have to ask my colleagues about it.

So now I have decided to write a blog post about it. Hopefully this will help me remember it. In any case, it will provide a handy reference. So here goes:
  1. Make sure you have the source and destination version of the code checked out
  2. CD to the project directory
  3. Give the command: svn merge -c
  4. Eg: $nishant/awesomeproject/awesomemodule/trunk: svnmerge -c 999 ../../uberstylechanges/awesomemodule
You need to do this for each of the modules that were changed. Hope this help. Happy merging!

May the source be with you!

No comments: