Problem
You need to learn how to clone a Github repository to start your first job? Your client wants you to clone their working repo and you need to learn how? Let me help you.
Solution
To clone a repository with Git you need your git client and the url of the repository. Normally you will clone the repo by https.
Once you have the url to the repository (e.g. https://github.com/mirumee/saleor), you can clone the repository. Simply attach an .git at the end of it (e.g. https://github.com/mirumee/saleor.git)
GUI Client (Sourcetree)
As a graphical git client I will use Sourcetree in this Example.
Select Clone and git clones the repo.
Once the cloning process process finished it looks like this:
Git cli client
I use a terminal with the Git client on Mac OS for this example:
Explanation
In both cases have you downloaded (cloned) the public Github repository successfully. Inside the directory (in this example saleor) you find code of the lastest master version.
git clone $url + “.git” is how you clone a public repository from Github normally.
In Sourcetree you use clone from url and also use $url + “.git” as the url to start the cloning process.
Other graphical git clients are similar to Sourcetree and you shouldn´t have any problems finding the option in them too.
Github offers also the options to clone a repository via SSH. For a developer it is more unusual to use this option. It’s more likely to be used on a server when you want to automate processes.
Background
Git as a source code versioning system has widespread usage today. Especially thanks to its decentralized structure it is easy to use. And many place offer hosting for it.
Github is for a long time already the choice for open source projects where hundreds or thousands of developers are working alone or together on projects. Companies also use it more and more.
Which makes you more valuable when you know how to use git. How to clone a Github repository is the first step on that road.
Let me know when it helped.
Best,
Frank
Sources:
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository