In the project's warehouse, there is a project A, and I fork it into my own warehouse as project B.
At this time, the branches of project B and project A are the same. Later, after creating a new branch in project A, how do I synchronize this branch to project B?
Add:
Project A is built on gitlab, so the fork operation is also performed on gitlab
On gitlab, it seems that there is no such operation as new pull request
How to implement my above requirements in the Linux command line
new pull request Use other people’s projects as sources and synchronize them to your project
Take github as an example. For project B after forking, use the new pull request button, and then select the subsequent list to obtain each branch on A
In this case, as far as I know, there are two ways:
If it is github, you can follow the method given by Dade. I don’t know if gitlab has it. This method is more convenient.
You can follow the method you gave, first pull the update of library A to the local, then merge it locally and push it to the library B.
I asked a colleague for advice today, and one method he gave is
Among them, the above two steps 3 and 4 can be combined into the following step:
The above process, in general, is to pull the branch of project A to the local, and then push from the local to project B, that is, the local is used as an intermediate bridge.
If you have other methods, please feel free to tell me!