Skip to content

What is the difference between cloning and branching? #22286

Discussion options

You must be logged in to vote

Hi @darienspringer654,

Welcome to Github Community Forum!

They are completely different. I will try to explain with an example.

Consider a history of a repository:

                 master ->  A—B---C—D 

A, B, C, D are commits of this repository made on the master branch. Consider that this repository is stored in a server (like github), normaly the main repository are called origin. We want to develop some new things on this project so we clone this repository on our local pc:

              origin /master ->  A—B---C—D 

                                                      II   clone

              local /master ->  A—B---C—D

After some changes and commits you will have this history:

     …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants