How to fork a project on Gitlab?

Hello, my dear friends, welcome to the most abundant part of programming that makes your life very great with enormous pleasure because this is the place where everyone should want to know that what is worth it? and how it plays an important role in real life. So, today we will learn about how can you fork a project and manage them. For this, I will go very basic step by step. I wish that you will read it till the end.

What is a fork?

Let’s understand this. In very simple words, a fork is a copy of a project, forking a pro/repo allows you to make changes without affecting the original project or copy. Whenever you want to make changes to the project or you do not want to change anything in the original copy then you can create a fork that you can create a copy and make your changes. And later on, you can merge with the original project as well.

How to fork a project?

So, here is step no.1

Step 1: log in to Gitlab and go to your project

So, you will go to your Gitlab and sign in or log in with your credentials. And then you will go to your project where there will be your single project. You can also go from there with the above project option. You will see, your project will be there then you can also go to your projects from there as well.

Step 2: Click on the fork button

So, there on your projects. You will see, there will be a button. That will be a fork, in your project. When you will click on that button then you will get a message like No spaces available for the name to fork the project.

I tell you that what will you do? When you will see a message like this. You will see a group option on the top menu then you will click on your groups. And once, you will have it on the group screen. You will see the New Group option beside the corner. Then, you will click on that and give your group name and description. If you want to keep public or private, you can do that with one click. So, your group will have created at that time. If you will go back to your project and there you will again click on the fork option. So, they will ask to select a namespace to fork the project and you will see, your created group will be there. Then you will see that the project has successfully forked. You can also create merge requests over there.

For example, On the copy of the project, you can make some changes, and once, you have to change. If you create a merge request to merge with your original branch. Then you will do a new merge request so, you will select source branch and branch name and after that, you will also select the target branch & their name. And you will click on compare branches & continue. If any changes will have been done there so, it will see in that but you will have not done any changes in the copied or forked project. Then, it will show you as usual. If you have done any changes in that & you will do submit a merge request then you will have to realize the changes and you can submit back. And this is how you can do forking of a project and a copy of the project.

Related video:

Facebook Notice for EU! You need to login to view and post FB Comments!