mirror of
https://gitlab.com/ric_harvey/git-guide.git
synced 2024-11-27 13:24:03 +00:00
Add cloning an existing repository
This commit is contained in:
parent
0404833aca
commit
ad377aa397
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue