Why do we need to use fork() and what is its purpose? Fork creates a duplicate process and a new process context When it returns a 0 value it means that a child process is running, but when it returns another value that means a parent process is running. A fork is a copy of a project folder (repository) into your github account or onto your desktop if you use github on your desktop This allows you to freely experiment with changes without affecting the original project. A fork is just a request for github to clone the project and registers it under your username
Github also keeps track of the relationship between the two repositories, so you can visualize the commits and pulls between the two projects (and other forks). I forked a project, made changes, and created a pull request which was accepted New commits were later added to the repository How do i get those commits into my fork? 35 fork() duplicates the process, so after calling fork there are actually 2 instances of your program running How do you know which process is the original (parent) one, and which is the new (child) one
8 the main difference between fork() and exec() is that, the fork() system call creates a clone of the currently running program The original program continues execution with the next line of code after the fork () function call The clone also starts execution at the next line of code. I want to fork on windows What is the most similar operation, and how do i use it? I'd like to know more about the advantages and disadvantages of forking a github project vs
Creating a branch of a github project Forking makes my version of the project more isolated from the Fork relationship means, that you can easily tell github that it should send a pull request (with your changes) from your fork to the original repository because github knows that your repository is a copy of the original repository (with a few changes on both sides).
WATCH