Git clone repository to your computer

by Daniel Pham
Published: Updated:

Git clone repository to your computer. After you have created the repository, how do you work with it now?

This article, I will guide you to use Git to clone the repository to your computer.

You need to install Git on your computer to use it.

Recommended Reading: How to install GIT version control system?

Get the clone URL of the repository

Now, please login to Gitlab, click to select your repository. For example, I select a repository named

Then, press the Clone button in the right corner of the screen. It will display 2 URLs for you to choose.

git clone a repository to your computer
Git clone a repository to your computer.
  1. Clone with SSH: you clone via SSH protocol.
  2. Clone with HTTPS: that you clone through HTTPS protocol.

Both options are good and you can use them freely. For me, I use HTTPS.

You click the copy button to the right of the URL.

Git clone repository to your computer

I am using Linux, so I just need to open up the terminal and start using.

If you are using Windows, open the Git Bash program.

You type the command below to clone the repository to your computer, please replace your corresponding URL.

git clone

It’s look like this.

danie@linuxmint ~/Desktop/down/gitlab $ git clone
Cloning into ''...
Username for '': Danny_Pham
Password for 'https://[email protected]': 
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

Because I’m putting the repository in Private mode, when clone, it will ask me to enter the Gitlab account username and password.

Now, when I list the repository that I cloned to the computer, you will see the README file in it.

danie@linuxmint ~/Desktop/down/gitlab $ ls
danie@linuxmint ~/Desktop/down/gitlab $ cd
danie@linuxmint ~/Desktop/down/gitlab/ $ ls


This is the first step you use Git to work with your repository. Perform clone it to the computer. If you notice, the source clone directory under the computer and on Gitlab is exactly the same.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Notify of
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.



Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 – All rights reserved.

Please write sources “” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Would love your thoughts, please comment.x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.