User Tools

Site Tools


computing:git:clone-remote-repo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
computing:git:clone-remote-repo [2026/08/28 09:38] – oscarcomputing:git:clone-remote-repo [2026/12/01 04:42] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Clone a remote Repo ====== 
-==== Clone Repo ==== 
-Go into the directory, where you want to receive the directory of the repository to be cloned: 
-To clone a repository from a remote to your local machine, use git clone: 
-  $ git clone <repository-url> 
-The <repository-url> you can find in the browser bar of github or forgejo. Which will look something like this:  
-<code> 
-$ git clone http://192.168.178.86:3000/git-admin/homesite 
---------------------------------------------------------- 
-Cloning into 'homesite'... 
-remote: Enumerating objects: 139, done. 
-remote: Counting objects: 100% (139/139), done. 
-remote: Compressing objects: 100% (98/98), done. 
-remote: Total 139 (delta 38), reused 139 (delta 38), pack-reused 0 
-Receiving objects: 100% (139/139), 1.84 MiB | 41.92 MiB/s, done. 
-Resolving deltas: 100% (38/38), done. 
-</code> 
-This creates a new folder named after the repo (homesite) into your current working directory, containing the full project and its git history, already **connected to the remote as origin**. 
-==== After cloning ==== 
-Change into the repo directory and you're ready to work with it. If you want to confirm the remote is set correctly, run git remote -v inside the folder — it should show origin pointing to the URL you cloned from. 
-<code> 
-$ cd homesite 
  
-$ git remote -v 
---------------- 
-origin http://192.168.178.86:3000/git-admin/homesite (fetch) 
-origin http://192.168.178.86:3000/git-admin/homesite (push) 
-</code> 
-==== Usefull alternatives ==== 
-<code> 
-# Clone into a specific folder name 
-git clone <repository-url> my-folder-name 
- 
-# Clone only a specific branch 
-git clone -b branch-name <repository-url> 
- 
-# Shallow clone (only latest commit, faster for large repos) 
-git clone --depth 1 <repository-url> 
-</code> 
computing/git/clone-remote-repo.1787909933.txt.gz · Last modified: by oscar