What is a fork in GitHub?
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Hello folks, welcome to the exotic world of programming. Let’s take a move to the scene of the fork and its contribution in that how can we do fork and contribution in GitHub. If you would understand that each and every aspect of account creation, making a repository, and creating the branch in GitHub then this is the place where you can great ideology on the fork.
Adding more features
Suppose you have opened your profile and there is a repository of your like “GitHub training” and one of your files is there from the name of requirement.txt. So, you have to do designing of two features like dark mode and video calls but you don’t know how to do that? Then there is a contributor, it can make dark mode or one type of front hand. If anybody wants to contribute so, how will they do?
Contributing to the code
Suppose, you are a contributor and you are opened your own profile in the next browser. If you want to contribute to your GitHub project through your name like in beaproplayer and GitHub training then you will search like beaproplayer024/GitHub training in the GitHub search bar. So, there will have come of your repositories and requirement.txt file will open and from there you can create the file. When you will do create a file then the notification will come there like this way “you don’t have access to”. Because you have opened your own profile how can you get access to another profile id? You’re not a contributor and you have no right to doing changes in files. So, you will have to create a fork for this, what does it mean? It means that they have made a replica or you can say mirror for this. When you will do changes to this then one request will have to send to the beaproplayer024 profile. Suppose, you have to add a dark mode design, making a text file, you are making a darkmode.txt file. You are adding like designing, video calls, features adding and thanks, after this, you will have written like dark mode design adding in the propose new file. As you will do propose a new file then there will come a pull request option, you will have to do a pull request.
Forking in GitHub
You have done pull requests and there are all your files. If you have to do merge your file in that repository then you will have to send one request. When you will do pull requests then the front hand of your dark mode will be ready. When you will go to your profile beaproplayer so, you will see one pull request will have come there.
Analyzing the contributed code
If you will see a pull request, as well as one fork, will be there, what does it mean? If any contributor has to do contribute towards yourself so, how much contribute is happening as much fork happens. After this, you will go to pull request, you will see dark mode adding file there, what code has sent by the user? So, before, you will see about the code what is in that? You will move in a commit and see what is written in that code? There will be a dark mode design. Like this way, you will do verify that. After this, you will go to pull request and merge request, again you will do confirm request then your file will be merged from status open. After this, when you will go to code then your darkmode.txt file will have come which will be in the master branch. Those files will locate in your profile master branch and you can also see contributor or fork there. Like as your contribution happens and like this way, you can contribute to any project. When you will return back to your profile, below your profile activity option will exist there.
Merging the contributed code to the master branch
In your profile, every activity will show to you. Those files, you have added to it. If you would see in your profile changes will have happened and dark mode will have added to it. So, this is the contribution, you can do like this. You have seen, how can you do contribute to it and how can other users do contribute to your project. You have seen about all of these things.