Keeping the git history preserved, how do I move code from a particular branch of repoA to another repository repoB?
Asked
Active
Viewed 36 times
1 Answers
0
- On
repoA
checkout the branch you want to move torepoB
- Add
repoB
as a remote:git remote add repoB https://github.com/repo/repoB.git
- Push your current branch to the remote:
git push repoB
Note that in step 2 the 'remote' repo can actually be local (i.e. on your local box), e.g. git remote add repoB /home/repos/repoB/.git

simon-pearson
- 1,601
- 8
- 10