Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The simplest solution would be to set up both directories as submodules/subtrees (they already have some separate histories/svn repositories, right?). Then you just add to folder1 repository a remote that points to folder2 repository and you just merge the changes like it was any other remote:</p> <pre><code># go to folder1 repository cd /path/to/folder1repo # or `cd folder1` if you are familiar with inline submodule editing caveats # add a remote pointing to folder2 repo git remote add folder2 /path/to/repo/folder2 # fetch it git fetch folder2 # merge folder2 into folder1 git merge folder2/master </code></pre> <p>The only caveat is that you actually have a submodule and you have to commit to the superproject every time you merge those folders (since, say, folder1 will change and superproject must point to a different commit):</p> <pre><code>cd /path/to/superproject git add folder1 git commit -m "Merged folder2 submodule into folder1" </code></pre> <p>As an alternative to a submodule you could use subtree merge of both forlders' repos, the setup is a bit more complex, but then you just do pull to update all such subtrees :)</p> <p>Here is a nice subtree tutorial: <a href="http://nuclearsquid.com/writings/subtree-merging-and-you/" rel="nofollow">http://nuclearsquid.com/writings/subtree-merging-and-you/</a></p> <p>BTW. You can create a remote to an entirely different project and you can merge it's code with yours using simple merge :) git usage scenarios are infinite :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload