Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git how to transfer code from one branch to another existing branch (not necessarily master)?

Tags:

git

git-bash

I have my code in one branch in the team git repo. Now I need to "transfer" (i.e push) it into another branch of the same repo which team members are using. How can I do that ?

I prefer using git bash.

P.S - The new branch I have to transfer to is not "master".

like image 695
R11G Avatar asked Dec 20 '22 01:12

R11G


1 Answers

go to the target branch (git checkout target) and merge the code-having branch (git merge code-having). then, if needed, push the updated target branch to its remote.

like image 88
mnagel Avatar answered May 08 '23 12:05

mnagel