Q1: What is the difference between Forking and Cloning on GitHub?
Answer:
# When you say you are Forking a repository you are basically creating a copy of the repository under your GitHub ID. The main point to note here is that any changes made to the original repository will be reflected back to your forked repositories(you need to fetch and rebase). However, if you make any changes to your forked repository you will have to explicitly create a pull request to the original repository. If your pull request is approved by the administrator of the original repository, then your changes will be committed/merged with the existing original code-base. Until then, your changes will be reflected only in the copy you forked.
In short:
The Fork & Pull Model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer.
Note that after forking you can clone your repository (the one under your name) locally on your machine. Make changes in it and push it to your forked repository. However, to reflect your changes in the original repository your pull request must be approved.
# In a nutshell, Forking is perhaps the same as "cloning under your GitHub ID/profile". A fork is anytime better than a clone, with a few exceptions, obviously. The forked repository is always being monitored/compared with the original repository unlike a cloned repository. That enables you to track the changes, initiate pull requests and also manually sync the changes made in the original repository with your forked one.
* Forked project is on your online repository (repo).
* Cloned project is on your local machine (I usually clone after forking the repo).
You can commit on your online repo (or commit on your local repo and then push to your online repo), then send pull request.
Project manager can accept it to get your changes in his main online version.
https://guides.github.com/activities/forking/
https://help.github.com/articles/fork-a-repo/
https://www.quora.com/What-is-the-difference-between-Git-Clone-and-Fork
Answer:
# When you say you are Forking a repository you are basically creating a copy of the repository under your GitHub ID. The main point to note here is that any changes made to the original repository will be reflected back to your forked repositories(you need to fetch and rebase). However, if you make any changes to your forked repository you will have to explicitly create a pull request to the original repository. If your pull request is approved by the administrator of the original repository, then your changes will be committed/merged with the existing original code-base. Until then, your changes will be reflected only in the copy you forked.
In short:
The Fork & Pull Model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer.
Note that after forking you can clone your repository (the one under your name) locally on your machine. Make changes in it and push it to your forked repository. However, to reflect your changes in the original repository your pull request must be approved.
# In a nutshell, Forking is perhaps the same as "cloning under your GitHub ID/profile". A fork is anytime better than a clone, with a few exceptions, obviously. The forked repository is always being monitored/compared with the original repository unlike a cloned repository. That enables you to track the changes, initiate pull requests and also manually sync the changes made in the original repository with your forked one.
* Forked project is on your online repository (repo).
* Cloned project is on your local machine (I usually clone after forking the repo).
You can commit on your online repo (or commit on your local repo and then push to your online repo), then send pull request.
Project manager can accept it to get your changes in his main online version.
https://guides.github.com/activities/forking/
https://help.github.com/articles/fork-a-repo/
https://www.quora.com/What-is-the-difference-between-Git-Clone-and-Fork
Comments
Post a Comment