In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to carry out fork in gitlab. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Fork is generally used for open source project collaboration to clone a copy of the original code to your own warehouse through fork and modify it based on your own warehouse; then merge the modified code into the original repository by initiating pull request (also known as merge request).
Fork
Here use gitlab to do the demonstration, first log in to gitlab and find a copy of someone else's project fork.
Then in your own personal project, you can see the code that belongs to your fork.
Keep fork code up to date
After fork completes the code, we will git clone locally to modify the action.
There is a situation here. If the code of the original warehouse is updated and our fork warehouse needs to be obtained, then we need to set the code pull address of the local clone to the original warehouse. First, we look at the original push and pull addresses through the "git remote-v" command.
Git remote-vorigin http://gitlab.xxxx.cn/lu.xu/xxxx-xxxx.git (fetch) origin http://gitlab.xxxx.cn/lu.xu/xxxx-xxxx.git (push)
Then we set the remote address to the original warehouse address.
Git remote set-url origin "original address" # then check out git remote-vorigin http://gitlab.xxxx.cn/xxxx/xxxx-xxxx.git (fetch) origin http://gitlab.xxxx.cn/xxxx/xxxx-xxxx.git (push)
Next, change the address of the local push to the warehouse address of your own fork
Git remote set-url-- push origin "own fork address" # set up and check out git remote-vorigin http://gitlab.xxxx.cn/xxxx/xxxx-xxxx.git (fetch) origin http://gitlab.xxxx.cn/lu.xu/xxxx-xxxx.git (push)
At this point, when we fetch, the code we get is up-to-date, while when we push, push goes to our own fork repository.
Multiple versions use updates
We use fork's warehouse, which is usually based on a feature branch of master checkout.
In the update, we need to cut to master for pull operation to keep the master branch consistent with the original repository.
Then switch to the feature branch and merge the local master so that the feature branch is up to date.
Submit
The submission of the feature branch is submitted directly to its own fork repository.
If you want to merge the feature branch into the original repository, you need to initiate pull request (merge request) in your own fork repository.
The above is how to do fork in gitlab. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.