While working with git, we may need to import source code from an existing git repository to our working copy. Merging it and pushing to origin master. The scenario that I had was :
- I have a project template that I store on a git repository. Let say the url is
I have another git repository with url
What I need from the two repositories are importing all contents (libraries, sources, etc) from
template repository into my
project1 working copy. Since I don’t want to coding from zero. To get into what I need, here are the steps.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
The next step is checking the merge result on our working copy of master branch. If what we have been imported already there, now we can remove the remote URL of REMOTE.TEMPLATE and TEMPLATE branch to get rid of the extra branch before pushing.
1 2 3 4 5 6 7 8