GitHub for The Modern Data Scientist: 7 Concepts You Can’t .gitignore

-

2. Clone it or fork it?

When someone looks at a distant repository, there are 4 things that will occur. The likeliest plan of action (case 0) is that they ignore it or give it a star in the event that they are feeling generous.

In the primary case, if the README was convincing enough, they could clone it.

image.png
Image by me

Cloning a distant repository with commands like git clone https://github.com/username/awesome_repo creates a precise copy of awesome_repo in your local machine, providing you with access to the project’s entire Git history in addition to write access to all of the files. Nevertheless, when you make changes to this local copy of awesome_repo, its distant copy won’t feel a thing.

Within the second case, if the README was much more convincing, an individual might fork it.

image.png
Image by me

Whenever you fork awesome_person‘s awesome_repo on GitHub, you’ll have the precise copy of awesome_repo under your account.

Your GitHub page may have a recent your_username/awesome_repo repository with the identical content and history as awesome_person/awesome_repo. If you desire to make changes to this copy, you may clone your_username/awesome_repo in order that additionally it is in your local machine.

There are numerous explanation why someone might fork one other’s repo. The primary reason is to contribute to someone/awesome_repo by submitting pull requests (see below). Another excuse is to create a recent project based on the unique code, without affecting it.

A notable example of that is the Manim GitHub community, which is a more maintained and documented fork of the legendary Manim repository by Grant Sanderson (creator of 3Blue1Brown and all its videos).

To distinguish between originals and forks, GitHub adds a “forked from original_repo” label on repository pages.

The third case is while you access certainly one of your personal distant repositories from a distinct machine. As an illustration, you left your laptop in a dry cleaner’s, and you desire to proceed working on the project within the office.

On this case, all you’ve got to do is clone the repo to download its contents to the office Mac. But, the Git installation on the Mac should be under your GitHub username if you desire to sync your changes.

ASK DUKE

What are your thoughts on this topic?
Let us know in the comments below.

135 COMMENTS

0 0 votes
Article Rating
guest
135 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Share this article

Recent posts

135
0
Would love your thoughts, please comment.x
()
x