国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
What Is GitHub Clone?
Why Clone GitHub?
How to Clone a GitHub Repository?
How to Clone from GitHub Using the Command-Line?
Cloning a Repository Using GitHub Desktop
How to Clone an Empty Repository?
How to Duplicate a Repository?
Mirror a Repository
Mirror a Repository Containing Git Large File Storage Objects
Mirror a Repository in Another Location
Home Computer Tutorials Computer Knowledge How to Clone GitHub Repository and Duplicate the Repository?

How to Clone GitHub Repository and Duplicate the Repository?

Jun 22, 2025 am 12:26 AM

How to Clone GitHub Repository and Duplicate the Repository?

This article provided by MiniTool guides you through the process of cloning/duplicating a GitHub repository in various ways and scenarios. Study each method carefully and select the one that best fits your needs!

What Is GitHub Clone?

In general, when we mention GitHub clone, we are referring to cloning a GitHub repository. This means making a copy of the GitHub repository.

Why Clone GitHub?

When you create a GitHub repository, it initially exists as a remote repository. However, you can clone your repository to a local area on your computer and synchronize between these two locations.

To facilitate adding/moving files, resolving merge conflicts, and pushing larger commits more easily, it is recommended to clone your repository from the GitHub data center to your local computer.

You can also clone your own existing repository or someone else's existing repository to contribute to a project.

How to Clone a GitHub Repository?

Cloning your repository downloads a complete copy of all the repository data that GitHub has at that moment, including all versions of every file and folder for the project. You can push your changes to the remote repository on GitHub or pull others' changes from GitHub.

How to Clone from GitHub Using the Command-Line?

Let’s dive into the instructions!

Step 1. On GitHub, go to the main page of the repository.

Step 2. Above the files list, click the Code button.

Step 3. There are three options for you to clone a GitHub repository.

  • Clone with HTTPS
  • Use SSH
  • Use GitHub CLI

Select the option you prefer and click the copy icon next to the URL link.

Alt=Clone from GitHub

Step 4. Launch Git Bash.

Step 5. Change the current working directory to your desired destination.

Step 6. Type git clone and paste the link you copied earlier.

$ git clone http://m.miracleart.cn/link/7fb15019103809d7311d26d2e8bb47ed

Step 7. Press Enter to create your local repository. Then, wait for the cloning process to finish.

Cloning a Repository Using GitHub Desktop

To clone a repository to GitHub Desktop, the steps are similar to using commands. The difference is that after clicking the Code button, you should choose the Open with GitHub Desktop option to open the repository with GitHub Desktop. Then, click Choose and navigate to the local path via Windows Explorer. Finally, click Clone.

How to Clone an Empty Repository?

An empty repository contains no files. It is typically created when you do not initialize the repository with a README when creating it.

The method for cloning an empty repository is similar to cloning a regular repository. You have three options to choose from: Set up in Desktop, HTTPS, and SSH.

How to Duplicate a Repository?

To copy a repository without forking it, you need to run a special clone command and then mirror-push to the new repository.

First, you must create the new repository on GitHub using commands like username/new-repository or username/mirrored.

Mirror a Repository

1. Open Git Bash.

2. Make a bare copy of the repository:

$ git clone –bare http://m.miracleart.cn/link/726bd18c52afc248015dcdbc463c6f85

3. Mirror-push to the new repository:

$ cd old-repository.git

$ git push –mirror http://m.miracleart.cn/link/cef347a99ab5be3642ec79a8e2c0bc87

4. Delete the temporary local repository you created:

$ cd ..

$ rm -rf old-repository.git

Mirror a Repository Containing Git Large File Storage Objects

1. Open Git Bash.

2. Make a bare copy of the repository:

$ git clone –bare http://m.miracleart.cn/link/726bd18c52afc248015dcdbc463c6f85

3. Move to the repository you cloned just now:

$ cd old-repository.git

4. Pull in the repository’s Git Large File Storage objects:

$ git lfs fetch –all

5. Mirror-push to the new repository:

$ git push –mirror http://m.miracleart.cn/link/cef347a99ab5be3642ec79a8e2c0bc87

6. Push the repository’s Git Large File Storage objects to your mirror:

$ git lfs push –all http://m.miracleart.cn/link/cef347a99ab5be3642ec79a8e2c0bc87

7. Remove the temporary local repository you created earlier:

$ cd ..

$ rm -rf old-repository.git

Mirror a Repository in Another Location

To mirror a repository in another location as well as get updates from the original, just clone a mirror and periodically push the changes.

1. Start Git Bash.

2. Create a bare mirrored clone of the repository:

$ git clone –mirror http://m.miracleart.cn/link/8db1625bead0f643f7f7913edc2a8434

3. Set the push location to your mirror:

$ cd repository-to-mirror.git

$ git remote set-url –push origin http://m.miracleart.cn/link/1345df26413e5a97ce4bddd35cad74b8

A bare clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, ensuring it remains identical to the original repository. Setting the URL for pushes simplifies pushing to your mirror. You can update your mirror through the following commands:

$ git fetch -p origin

$ git push –mirror

That’s everything about GitHub cloning. For more information about the git clone command or any issues related to it, simply search on Google for additional articles.

The above is the detailed content of How to Clone GitHub Repository and Duplicate the Repository?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to Translate a Web Page in Google Chrome How to Translate a Web Page in Google Chrome Jun 25, 2025 am 12:27 AM

In this post, you’ll learn how to translate a web page in Google Chrome on desktop or mobile, how to adjust Google translation settings, how to change Chrome language. For more Chrome tips, computer tips, useful computer tools, you can visit php.cn S

Five Ways to Fix the Esentutl.exe Error in Windows 10 Five Ways to Fix the Esentutl.exe Error in Windows 10 Jul 01, 2025 am 12:37 AM

Esentutl.exe is an executable file, playing a significant role in Windows system. Some people find this component lost or not working. Other errors may emerge for it. So, how to fix the esentutl.exe error? This article on php.cn Website will develop

What is the color accuracy and gamut coverage of the AG275UXM? What is the color accuracy and gamut coverage of the AG275UXM? Jun 26, 2025 pm 05:53 PM

TheAlienwareAG275UXMdeliversstrongcoloraccuracyandwidegamutcoveragesuitableforbothcreativeworkandgaming.1.Itoffersfactory-calibratedcoloraccuracywithΔEbelow2,oftenreachingΔE

How to Delete TikTok Account Permanently and Erase Data How to Delete TikTok Account Permanently and Erase Data Jun 25, 2025 am 12:46 AM

This tutorial teaches you how to delete TikTok account permanently from your device. You can go to your TikTok account settings to easily delete your account. After you delete the account, it will be deactivated for 30 days and be permanently deleted

How to Zoom in on PC? (On a Web Browser or an APP in Windows) How to Zoom in on PC? (On a Web Browser or an APP in Windows) Jun 24, 2025 am 12:39 AM

If you can’t see the font or the graphics on your computer screen, you can zoom in on Windows 10 for a better view of the screen. Do you know how to zoom in on PC? It is not difficult. In this post, php.cn Software will show you how to zoom in on you

How to Fix 'Your Version of Windows Has Reached End of Service” - MiniTool How to Fix 'Your Version of Windows Has Reached End of Service” - MiniTool Jun 19, 2025 am 12:51 AM

In your Windows Settings or you main full-screen, you may see the “your version of Windows has reached end of service” message. What does it mean? How to remove this message? This post from php.cn tells the details for you.

NTLite Windows 11: Download & Use to Create Your Own Lite Edition - MiniTool NTLite Windows 11: Download & Use to Create Your Own Lite Edition - MiniTool Jun 23, 2025 am 12:47 AM

What is NTLite used for? How do I debloat an ISO in Windows 11? If you want to debloat Windows 11 before installing it, you can run NTLite to create your own Lite Edition. In this post, php.cn will guide you NTLite Windows 11 download and how to use

How to Fix Hogwarts Legacy Not Using GPU on Windows 10/11? - MiniTool How to Fix Hogwarts Legacy Not Using GPU on Windows 10/11? - MiniTool Jun 17, 2025 am 09:53 AM

Hogwarts Legacy has caught many players’ eyes since its debut. New games will have many issues that need optimization at launch and Hogwarts Legacy is no exception. In this post on php.cn Website, we will show you how to fix Hogwarts Legacy not using

See all articles