This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1046|Reply: 3

Git Full Clone Project Repository (Image Repository)

[Copy link]
Posted on 2025-6-12 11:15:17 | | | |
Requirements: A project on GitHub needs to be fully cloned to a private git repository, including all branches and tags. If you just use git clone <Repository> , it will only clone the repository of the default main branch.

Review:
Download large projects using Git shallow clone source code
https://www.itsvse.com/thread-10451-1-1.html

This article is based on  The hyperlink login is visible.Take warehouses as an example.

Option 1

Back up the remote repository

You create a bare repository, and you can't modify the code directly locally. As shown below:



Push to a new private repository

After the operation is completed, as shown below:



Option 2 (not tested)

Clone all branches locally

Push to a new remote empty warehouse

Reference:

The hyperlink login is visible.
The hyperlink login is visible.




Previous:Rocky Linux 9 running dotnet 3.1 project libssl issue
Next:.NET/C# uses ClosedXML to read Excel into a DataTable
 Landlord| Posted on 2025-6-12 11:33:30 |
Naked clone (--bare): For developers who need a repository on the server to share changes but don't need local editing capabilities.
Mirror clone (--mirror): Designed to fully replicate the repository, including all Git data, making it ideal for backups or full repository migrations, suitable forWhen creating a backup or transitioning to a new server

 Landlord| Posted on 2025-8-22 10:42:32 |
gitlab creates repositories from other repository commands:

 Landlord| Posted on 2025-8-22 13:56:19 |
git syncs upstream code to downstream
Add an upstream image source

Updates for pull upstream:

Merge the upstream main branch (such as main or master) into your current branch:

Push
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com