开发者

Git Merge subdirectory to branch to root directory of master

I have a开发者_C百科 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.

Branch layout:

index.html
subdirectory
  > a.txt
  > b.txt

Master layout

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜