Wednesday, February 9, 2022

GitLab- Clone a Repository


Step 1:- Goto and select your repository

Step 2:- Copy the url (Clone URL Https)

Step3:- Clone it on your local system.

To clone main branch

git clone   

To clone a specific branch

git clone -b master

Step4:- A new directory with repository name will be created.

            cd springbootmicroservice

            git branch -M main

            git pull origin main  # pull the files from main branch

Step 5:- Create a new file in the local repo and push it to the remote repo.


            git add

            git commit -m " file is added"

            git push -uf origin main



Post a Comment