When you create a repository on your GitHub Enterprise instance, it exists as a remote repository. You can create a local clone of your repository on your computer and sync between the two locations.
This procedure assumes you have already created a repository on your GitHub Enterprise instance, or have an existing repository owned by someone else you'd like to contribute to.
On GitHub Enterprise, navigate to the main page of the repository.
In the right sidebar of the repository page, click to copy the clone URL for the repository.
Open Terminal (for Mac and Linux users) or the command prompt (for Windows users).
Change the current working directory to the location where you want the cloned directory to be made.
-
Type
git clone
, and then paste the URL you copied in Step 2.git clone https://hostname/YOUR-USERNAME/YOUR-REPOSITORY
-
Press Enter. Your local clone will be created.
git clone https://hostname/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.
Cloning a repository to GitHub Desktop
When GitHub Desktop is installed, you can clone any repository, or fork of a repository, from your GitHub Enterprise instance.
Tip: You can also clone repositories directly from GitHub Desktop. For more information, see "Adding and cloning repositories" in the GitHub Desktop Help.
On GitHub Enterprise, navigate to the main page of the repository.
In the right sidebar of the repository page, click to copy the clone URL for the repository.
In GitHub Desktop, after verifying the name and location on your hard drive where you'd like to clone the repository, click Clone.