S
S
stdio962017-05-04 14:19:48
git
stdio96, 2017-05-04 14:19:48

How to synchronize with a remote branch (not master) in GIT?

Hello. There is a company repository on bitbucket from which a fork was made to its repository. Until recently, I only worked with the master branch and committed all changes to my repository, and from it I already made a pull request to the main one. Now in the main repository there is a new branch newbranch. Question: how can I create the same branch in my repository, take all the changes from the newbranch (new branch) of the main repository, add my own and commit to this new branch, followed by a pull request to the company's repository in the new branch.
Thank you.
PS: sorry for the wording if I described something wrong, I'm not strong in GIT.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2017-05-04
@stdio96

Add their repository to yourself:
git remote add origin_company https://github.com/company/repo
git fetch origin_company

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question