Add cloning an existing repository

This commit is contained in:
Ric Harvey 2024-05-03 16:06:40 +01:00
parent 0404833aca
commit ad377aa397
Signed by: ric
GPG key ID: CD63CE502B962F16

View file

@ -81,6 +81,22 @@ git push -uf origin main
This will now sync all your your files up to the remote repository.
## Cloning an existing repository
If you want to pull code from an existing repository you have two options. SSH and HTTPS, if you have permissions on the project (you can push code to it) you should use SSH, if you are just pulling some code to run then HTTPS is fine but default to using SSH if you can.
The repository will have a code button on the right hand side of the page that when you click it, it will give you the options of cloning by SSH or HTTPS, you my also get options to download the repository as a zip or tgz file also.
![Clone Repository](./img/clone-repo.png)
Once you have the URL you can run **clone** command.
```bash
git clone <COPIED_GIT_URL>
```
Now you can change directory into that new folder and start working.
---
##### Follow me for more guides