Short tips: Merge two folders under Linux

22/11/2013 | Add comment

Sometimes it happens the revision controlling system (i.e. SVN or Git) structure and configuration of a project in Eclipse to get broken, making the user unable to use the VCS. This very same thing happened today so after lots of work we were unable to commit the changes to the Git repo we use. What do we do in this situation? We merge the two folders by recursively creating a patch with all folders in them.

If we have folder ProjectFolderOld which is the latest version that the user managed to push to the server and the latest version should be ProjectFolderNew, the patch between the folders is created by:

And then you move the ‘mergin.patch’ file into ProjectFolderOld and just execute:

Then you just need to commit the changes to the server or locally (if using distributed revision system). And that’s it.

Published in: development, tutorials