The clone command copies a project form an existing
remote Github repository to your local repository.
Follow these steps to clone a project from a remote git
repository to your local repository:
- Login into your Github account at
After you have logged-in, click on the project you want to clone.
On the project page, click on the clone button, a
dropdown will be shown with options to clone with
HTTPS and SSH. Select clone with HTTPS and copy the
Next, open terminal and go to the directory where
you want to copy the project. Use the following
command to clone the project:
git clone <remote repository https address>
Example: git clone https://github.com/tutorialsbuddy-hello/keycloak-sample.git
NOTE: You may be prompted for your username and personal access token if
you are cloning from a private Git repository.
- Next, navigate inside the cloned project folder
Example: cd keycloak-sample
Next, execute the following command from inside the
cloned project folder to update all remote-tracking
To view the current remote branches, execute the
git branch --remotes