Reputation: 163
Hey cause of the Corona crisis, I don't have access to the remote git repository cause the repository is on the local network of my company. So we work on local copies of the repository. Now my collegae created a new branch and added 3 commits to this branch. How do I create this branch and add the 3 commits to my local repository? I figured out to make the patches for the commits, but how do I create a new branch that is identical to the branch of my collegae? Does it just have to be the same name or is it more complicated than that? Once this crisis is over, idea is to push these changes to the remote repository.
Upvotes: 1
Views: 260
Reputation: 16043
Ask your colleague to run the following command
> git format-patch -3
0001-a.patch
0002-b.patch
0003-c.patch
This will create a list of patch files. Ask him to send it over to you. You can then apply these patch in serial order and you'll have identical changes in your branch.
Upvotes: 1