

The open-source community is in full demand and people are experimenting and inventing technologies and software, no one has imagined. the pre-git era ( if that term even exists).

To understand this, let us go back to the era before 2008 i.e. Now when you have an idea on the Difference between Git Clone and Git Fork, a good question if you are wondering about is cloning a part of forking? At this step, the user sends the changes to the owner of the repository as a request to merge the changes to the main central repository Step 5: Send changes to Original Repository: This process is called Pull Request in Git.Step 4: Pushing the Changes: Same as cloning.Step 3: Make the desired changes: Same as cloning.Step 2: Clone a Repository: Same as cloning.Step 1: Fork a Repository: Again the user starts from the upstream repository on GitHub but this process starts from forking when they fork a repository to their own GitHub account.Only the first and the last forking step differs from cloning. Step 3: Pushing the Changes: Once the changes or commits are done and now the modifications can be pushed to the upstream repository. *įorking a Repository is a five steps process but three steps are exactly the same as cloning.But the bottom line is, everything happens on their local system. In this step, a contributor can apply a single commit or multiple commits to the repository. Contribution in the form of editing the source files resulting in either a bug fix or adding functionality or maybe optimizing the code. Step 2: Make the desired changes: After cloning, contributors provide their contribution to the repository.Now they have the exact copy of the project files on their system to make the changes. This process starts from cloning when they clone the repository it into their local machine. Since the user navigated to the repository because he/she is interested in the concept and they like to contribute. Step 1: Clone a Repository: The user starts from the upstream repository on GitHub.The process of forking and cloning usually follows the following route: Cloning a Git Repo without Fork
#Git clone branch from remote code
Cloning is done through the command ' git clone' and it is a process of receiving all the code files to the local machine.įlow Process with Fork and Clone in GitHub Forking is just containing a separate copy of the repository and there is no command involved. It is a better option to fork before clone if the user is not declared as a contributor and it is a third-party repository (not of the organization).įorking is a concept while cloning is a process. So in that case, the changes made in the cloned repository are first pushed to the forked repository and then a pull request is created. If the user does not have write access, the only way to go is through the forked request. For this, the user must have the write access to the repository otherwise this is not possible. On the other hand, changes made on the local machine (cloned repository) can be pushed to the upstream repository directly. Pull request knocks the repository owner and tells that " I have made some changes, please merge these changes to your repository if you like it". Whereas, when you clone a repository, the repository is copied on to your local machine with the help of Git.Ĭhanges made to the forked repository can be merged with the original repository via a pull request.

When you fork a repository, you create a copy of the original repository (upstream repository) but the repository remains on your GitHub account. Forking is done on the GitHub Account while Cloning is done using Git.To clear out the air from your mind, if you have any, let see how these two terms differ: What are the major differences between Forking and Cloning? Why cloning and forking are used interchangeably?.Workflow of forking and cloning on GitHub.We have created this tutorial just to focus on the difference and make you clear about these two concepts viz. People of an organization working on a repository do not generally fork the repository. Since first you need to fork before cloning, although forking does not come as a strict pre-step for cloning. Difference between Git Clone and Git Fork It is not surprising that people sometimes consider these terms as similar. Throughout these two tutorials about Forking in GitHub and Cloning in GitHub, the reader might have got confused with the two terms and the Difference between Git Clone and Git Fork.
