Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

Merge new branch with uncorrelated history into repository subdirectory using Git

There are 2 branches in a repository: master and my_branch. my_branch is newly pushed branch with contents from another repository and uncorrelated history. I would like to merge my_branch into master, however:

git checkout master
git merge master my_branch

would merge them on the root level which is not what I want.

I would like to merge the root directory contents of my_branch with subdirectory of the root directory of master.

Would anyone be able to advise me on how to proceed on this?

question from:https://stackoverflow.com/questions/65908116/merge-new-branch-with-uncorrelated-history-into-repository-subdirectory-using-gi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...