i want merge remote repo in subdirectory of project. copied manually remote project subdirectory in project days ago , modified it. there new version of , want merge new changes in subdirectory without losing modifications.
structure:
myproject /mysubproject1 /mysubproject2 <-- 1 modified remote repo (from github) i tried following links, without success:
- how merge sub directory in git?
- http://bneijt.nl/blog/post/merge-a-subdirectory-of-another-repository-with-git
this have done:
cd myproject git remote add -mysubproject2_github https://github.com/something.git git merge -s ours --no-commit mysubproject2_github/master git read-tree --prefix=mysubproject2 -u mysubproject2_github/master but following
error: entry 'mysubproject2/.something.yml' overlaps 'mysubproject2/.something.yml'. cannot bind.
is possible want? idea how solve it?
instead of using submodules little bit messy, used subtrees. subtree project want add "parent" project:
here example, want add project nodejs-y-express github in our project.
add subtree our project
$ git subtree add --prefix node_express_subtree https://github.com/codeheroco/nodejs-y-express-rutas master git fetch https://github.com/codeheroco/nodejs-y-express-rutas master update project github
git subtree pull --prefix node_express_subtree https://github.com/codeheroco/nodejs-y-express-rutas master
Comments
Post a Comment