SystemMen - 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.
- Clone with SSH: you clone via SSH protocol.
- 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 https://gitlab.com/Danny_Pham/systemmen.com.git
It’s look like this.
danie@linuxmint ~/Desktop/down/gitlab $ git clone https://gitlab.com/Danny_Pham/systemmen.com.git Cloning into 'systemmen.com'... Username for 'https://gitlab.com': Danny_Pham Password for 'https://Danny_Pham@gitlab.com': 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 systemmen.com danie@linuxmint ~/Desktop/down/gitlab $ cd systemmen.com/ danie@linuxmint ~/Desktop/down/gitlab/systemmen.com $ ls README.md
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.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.