Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
269 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 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...