简体   繁体   中英

merge branch with subtree to develop

I added a subtree using the tutorial below to a branch in my repo:

https://www.atlassian.com/git/articles/alternatives-to-git-submodule-git-subtree/

However now when i change from one branch back to the branch that has the subtree i get this error

error: The following untracked working tree files would be overwritten by checkout:

Which contains all the files in folder with the subtree. Also how do i merge the branch with the subtree to develop? the subtree folder disappears.

How do i solve both of these two fundamental problems??

It seems if i just checkout the the feature branch with -f:

git checkout -f <branchWithSubtree>

For the second question using the end feature button in the gitflow in sourcetree done the trick. However now when i checkout the repository it doesnt show the subtree icon on the left hand side even thought the subtree is there, doesnt anyhow know if this is a sourcetree issue, or i am not doing something right?

Regards

After some research i realised that my issues with subtree were quite small, as posted above, checking out with '-f' solved the first issue.

The subtree icon in sourcetree answer is solved in the link below.

https://answers.atlassian.com/questions/276191/cannot-add-existing-subtree-to-sourcetree

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM