For all the self-taught geeks out there, here our content library with most of the learning materials we have produces throughout the years.
It makes sense to start learning by reading and watching videos about fundamentals and how things work.
Machine Learning Engineering (16 weeks)
Full-Stack Software Developer
Search from all Lessons
Curated list of small interactive and incremental exercises you can take to get better at any coding skill.
Curated section of projects to build while learning with simple instructions, videos, solutions and more.
Guides on different topics related to the technologies that we teach in our courses
Social & live learning
The most efficient way to learn: Join a cohort with classmates just like you, live streams, impromptu coding sessions, live tutorials with real experts, and stay motivated.
You can clone a git repository as simply as follows:
<git-repository-url> should be replaced by the link of the repository that you want to clone, like this:
Cloning a repository creates a local copy of the desired project/repository on your computer, which syncs between the two locations (Remote-Local).
In other words, cloning a repository means downloading a complete copy of it to your computer. And what does a complete copy mean? Well, it means that after cloning a repository you will have the entire history of the repository on your computer.
So why cloning a repository you may ask? Cloning a project has many benefits as:
And all this without the need to be connected to the internet. We will only need an internet connection when we want to "share" our work with someone else or we want to upload our work to GitHub.
In the following section, we will dive in on more detailed examples of how to clone a github repository and also how to fork any github repository.
For this example, we will clone one of 4Geeks popular repositories, that is 4Geeks react-flask-hello. The steps to clone this repository are as follows:
my-first-cloned-repoas shown below.
cdand add/copy the directory/folder location/path. Since we want to save the repository in our folder
my-first-cloned-repo, let's copy the folder's path
C:\Users\rafam\Programming Projects\my-first-cloned-repoand paste it on the terminal, you can also drag and drop the folder on the terminal and press enter
git clonealong with the copied URL
It is important to understand that you can clone any repository not only from GitHub, but from any other site, if you have the git URL. Remember that you clone a repository with the
git clone <url> command.
The difference between forking and cloning a project/repository really comes down to how much control a developer is allowed to have over a given repository.
By Forking, you can make your own copy of a repository somewhere else (for example, GitHub). Owning a copy of the repository means that you can make changes to it without affecting the original repository.
Cloning creates a local copy of a repository. Imagine doing that by downloading a repository to your computer's local storage. Clones have references to their original repositories, unlike forks.
So you want to make your own copy of a repository, let's make a copy of the one that we cloned in the example above 4Geeks react-flask-hello.
The steps to fork the repository are the following:
Go to the GitHub repository 4Geeks react-flask-hello
Click the Fork button located in the top right corner of the page
Then, an owner must be selected for the forked repository by clicking the Select an owner button and choosing the Repository name. You can also add a description (optional) to your fork if desired.
mainbranch only) that allows you to only copy the main branch, if you want to copy the whole repository with all of its branches, then this box should be unmarked.
You can now click Create Fork and it'll be done
You can also use the GitHub Desktop App to clone a repository to your computer, once you have downloaded the GitHub Desktop App here https://desktop.github.com/, and being signed to the GitHub website and Desktop App, then you can follow these steps:
Go to the desired GitHub repository, let's use the 4Geeks react-flask-hello repo again. Click on the Code button to display the options and proceed to click the Open with GitHub Desktop button.
The GitHub Desktop App will automatically open on your computer and a window called Clone a repository will be displayed. Here you can confirm the repository to be cloned and you can change the local path where the repository will be saved by clicking the Choose... button, or you can just copy the path and paste it in the corresponding field.
You can now proceed to click the Clone button and the repository will be cloned in the desired path/directory
The following video describes the step by step of everything that has been explained in this GitHub Clone Repository article: