Git merge between two folders, not branches

git, merge

Solution

This questions is very old, I joined recently.

I am using ubuntu, and use meld to solve merge issues.

So If I have 2 folders of the same app, which might have minor changes.

I will do this in the terminal

meld ./app_branch_master ./app_branch_dev

This will open up both the folder, Meld will take time to compare both the folders. It will show you what's there on left hand side and what's on the right hand side. You can also move little code from there.

That's how I do it.

Problem

Suppose the following scenario: I have a git project that has a dir named `project`. Inside this dir I made some commits. Then, with `cp -r` I duplicated this dir to a dir called `project-with-feature-b`, i.e. I manually created a branch. Now I want to merge these two folders like if they were two branches, is there any way to do that using git? To be more specific to my problem. I have a svn repository which I am using with git-svn tool to clone it. And I cant use the -T/-b/-t options but I want to make a merge.

Original source

Related problems