Command to Clone Repository Using Git Bash

If you are using Git Bash the command line interface for Git on Windows and you want to clone a remote repository to your local system then you can make use of the git clone command.

Syntax:
git clone <remote-repository-url>

Examples:

    GitLab:

    Clone a GitLab repository using HTTPS:

    git clone https://gitlab.com/user-name/repository-name.git

    Clone a GitLab repository using SSH:

    git clone git@gitlab.com:user-name/repository-name.git

    GitHub:

    Clone a GitHub repository using HTTPS:

    git clone https://github.com/user-name/repository-name.git

    Clone a GitHub repository using SSH:

    git clone git@ github.com:user-name/repository-name.git

    Bitbucket:

    Clone a Bitbucket repository using HTTPS:

    git clone https://github.com/user-name/repository-name.git

    Clone a Bitbucket repository using SSH:

    git clone git@ bitbucket.org:user-name/repository-name.git
    Clone a repository using Git Bash Example

    Comments & Discussion

    Facing issues? Have questions? Post them here! We're happy to help!