Linux git clone https

Cloning a repository

When you create a repository on GitHub.com, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.

About cloning a repository

You can clone a repository from GitHub.com to your local computer, or to a codespace, to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine, or to a remote virtual machine when you create a codespace. For more information about cloning to a codespace, see «Creating a codespace for a repository.»

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

Cloning a repository pulls down a full copy of all the repository data that GitHub.com has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on GitHub.com, or pull other people’s changes from GitHub.com. For more information, see «Using Git».

You can clone your existing repository or clone another person’s existing repository to contribute to a project.

Cloning a repository

  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click

Screenshot of the list of files on the landing page of a repository. The

Code.

    To clone the repository using HTTPS, under «HTTPS», click

Читайте также:  Setting console font linux

Screenshot of the

.

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY > Cloning into `Spoon-Knife`. > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. > remove: Total 10 (delta 1), reused 10 (delta 1) > Unpacking objects: 100% (10/10), done.

To learn more about GitHub CLI, see «About GitHub CLI.»

To clone a repository locally, use the repo clone subcommand. Replace the repository parameter with the repository name. For example, octo-org/octo-repo , monalisa/octo-repo , or octo-repo . If the OWNER/ portion of the OWNER/REPO repository argument is omitted, it defaults to the name of the authenticating user.

You can also use the GitHub URL to clone a repository.

gh repo clone https://github.com/PATH-TO/REPOSITORY
  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click

Screenshot of the list of files on the landing page of a repository. The

Code.

Screenshot of the

Open with GitHub Desktop.

Cloning an empty repository

An empty repository contains no files. It’s often made if you don’t initialize the repository with a README when creating it.

  1. On GitHub.com, navigate to the main page of the repository.
  2. To clone your repository using the command line using HTTPS, under «Quick setup», click

. To clone the repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click SSH, then click

Screenshot of the quick setup instructions for an empty repository. To the right of the HTTPS URL for the repository, a copy icon is outlined in dark orange.

.

Alternatively, to clone your repository in Desktop, click

Screenshot of the quick setup instructions for an empty repository. A button, labeled with a download icon and

Set up in Desktop and follow the prompts to complete the clone.

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY > Cloning into `Spoon-Knife`. > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. > remove: Total 10 (delta 1), reused 10 (delta 1) > Unpacking objects: 100% (10/10), done.

Troubleshooting cloning errors

When cloning a repository it’s possible that you might encounter some errors.

If you’re unable to clone a repository, check that:

  • You can connect using HTTPS. For more information, see «Troubleshooting cloning errors.»
  • You have permission to access the repository you want to clone. For more information, see «Troubleshooting cloning errors.»
  • The default branch you want to clone still exists. For more information, see «Troubleshooting cloning errors.»

Further reading

Источник

Cloning a repository

When you create a repository on GitHub.com, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.

About cloning a repository

You can clone a repository from GitHub.com to your local computer, or to a codespace, to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine, or to a remote virtual machine when you create a codespace. For more information about cloning to a codespace, see «Creating a codespace for a repository.»

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

Cloning a repository pulls down a full copy of all the repository data that GitHub.com has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on GitHub.com, or pull other people’s changes from GitHub.com. For more information, see «Using Git».

You can clone your existing repository or clone another person’s existing repository to contribute to a project.

Cloning a repository

  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click

Screenshot of the list of files on the landing page of a repository. The

Code.

    To clone the repository using HTTPS, under «HTTPS», click

Screenshot of the

.

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY > Cloning into `Spoon-Knife`. > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. > remove: Total 10 (delta 1), reused 10 (delta 1) > Unpacking objects: 100% (10/10), done.

To learn more about GitHub CLI, see «About GitHub CLI.»

To clone a repository locally, use the repo clone subcommand. Replace the repository parameter with the repository name. For example, octo-org/octo-repo , monalisa/octo-repo , or octo-repo . If the OWNER/ portion of the OWNER/REPO repository argument is omitted, it defaults to the name of the authenticating user.

You can also use the GitHub URL to clone a repository.

gh repo clone https://github.com/PATH-TO/REPOSITORY
  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click

Screenshot of the list of files on the landing page of a repository. The

Code.

Screenshot of the

Open with GitHub Desktop.

Cloning an empty repository

An empty repository contains no files. It’s often made if you don’t initialize the repository with a README when creating it.

  1. On GitHub.com, navigate to the main page of the repository.
  2. To clone your repository using the command line using HTTPS, under «Quick setup», click

. To clone the repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click SSH, then click

Screenshot of the quick setup instructions for an empty repository. To the right of the HTTPS URL for the repository, a copy icon is outlined in dark orange.

.

Alternatively, to clone your repository in Desktop, click

Screenshot of the quick setup instructions for an empty repository. A button, labeled with a download icon and

Set up in Desktop and follow the prompts to complete the clone.

git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY > Cloning into `Spoon-Knife`. > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. > remove: Total 10 (delta 1), reused 10 (delta 1) > Unpacking objects: 100% (10/10), done.

Troubleshooting cloning errors

When cloning a repository it’s possible that you might encounter some errors.

If you’re unable to clone a repository, check that:

  • You can connect using HTTPS. For more information, see «Troubleshooting cloning errors.»
  • You have permission to access the repository you want to clone. For more information, see «Troubleshooting cloning errors.»
  • The default branch you want to clone still exists. For more information, see «Troubleshooting cloning errors.»

Further reading

Источник

Оцените статью
Adblock
detector