Git Merge subdirectory to branch to root directory of master
I have a branch that has the content of the master branch as a subdirectory. Now I made some changes to this subdirectory. Ideally I want to be able to merge these changes back into the master branch.
index.html subdirectory > a.txt > b.txt
How would I go about doing this? Is it even a good approach? In SVN I avoided merging subdirectories back into the trunk. But this is a somewhat different use case, the layout of both, the branch and master, will never change.
2 Solutions collect form web for “Git Merge subdirectory to branch to root directory of master”
You could try
- making a branch from your current branch (
git branch to_be_merge_to_master)
- moving back your file to the correct structure (
git mv ...)
- merging that second branch to master
make use of git submodules