Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move branch from one repository to another branch of different repository

I created a new Repository (named repoN) with the existing one (named repoE), simply by copying code from the branch (named B22).

After that, I created a new branch in repoN (named BR01). Now I made some changes in the branch (named BR01) which exist in repoN repository.

I just want to take all those changes into the old repository repoE without loosing history of BR01 into B22.

I am using SourceTree because I'm new in Git and don't know much commands.

like image 525
user2380509 Avatar asked Jun 30 '16 09:06

user2380509


1 Answers

  1. stand on your current repo you want to push from
  2. checkout the branch you want to push
  3. git remote add repoRemote https://bitbucket/repo/repo1.git
  4. git push repoRemote -- will push your current branch to the remote repo you added in #3
like image 139
Smart Coder Avatar answered Nov 14 '22 19:11

Smart Coder