1.

What is Git fork? What is the difference between fork, branch and clone?

Answer»
  • CLONE: By cloning a repository, you DOWNLOAD the WHOLE repository with dotfiles (like .git, .gitignore etc.) to your local computer. A clone is a localized copy of some REMOTE repository. When we clone, we are actually bringing the entire source repository, including all the history and branches locally.
  • Fork: By forking a repository, you just virtually create a “copy” of the main repository to your account. Forks are usually useful in creating Pull Request(s) to the main repository. A fork is a remote, server-side copy of a repository, distinct from the original.

A branch is a way to handle the changes within a SINGLE repo to eventually integrate them with the rest of the code. A branch exists within a repository only. Conceptually, it represents a thread of development which is needed to manage development/maintenance.

The owner of the main repository gets a notification on their newsfeed when you fork their repository, however, it’s impossible to track if you clone / download their repository. However, note that you won’t be able to submit Pull Request(s) with a download as there are no dotfiles



Discussion

No Comment Found