Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>A clone is simply a copy of a repository. On the surface, its result is equivalent to <code>svn checkout</code>, where you download source code from some other repository. The difference between centralized VCS like Subversion and DVCSs like Git is that in Git, when you clone, you are actually copying the entire source repository, including all the history and branches. You now have a new repository on your machine and any commits you make go into that repository. Nobody will see any changes until you push those commits to another repository (or the original one) or until someone pulls commits from your repository, if it is publicly accessible.</p> <p>A branch is something that is within a repository. Conceptually, it represents a thread of development. You usually have a master branch, but you may also have a branch where you are working on some feature xyz, and another one to fix bug abc. When you have checked out a branch, any commits you make will stay on that branch and not be shared with other branches until you merge them with or rebase them onto the branch in question. Of course, Git seems a little weird when it comes to branches until you look at the underlying model of how branches are implemented. Rather than explain it myself (I've already said too much, methinks), I'll link to the "computer science" explanation of how Git models branches and commits, taken from the Git website:</p> <p><a href="http://eagain.net/articles/git-for-computer-scientists/" rel="noreferrer">http://eagain.net/articles/git-for-computer-scientists/</a></p> <p>A fork isn't a Git concept really, it's more a political/social idea. That is, if some people aren't happy with the way a project is going, they can take the source code and work on it themselves separate from the original developers. That would be considered a fork. Git makes forking easy because everyone already has their own "master" copy of the source code, so it's as simple as cutting ties with the original project developers and doesn't require exporting history from a shared repository like you might have to do with SVN.</p> <p>EDIT: since I was not aware of the modern definition of "fork" as used by sites such as GitHub, please take a look at the comments and also <a href="https://stackoverflow.com/a/9204499/370671">Michael Durrant's answer</a> below mine for more information.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload