Get started Bring yourself up to speed with our introductory content.

Quickly find and use a GitHub URL example

How to use the GitHub URL

A Git repository is of very little use if it resides entirely on your remote GitHub or GitLab account. To actually work with the various files and resources stored in that repository, you need to pull or clone that code from the remote repo to your local machine. And to do that, you need to find the GitHub URL and use it.

To use a GitHub URL, follow these steps:

  1. On the GitHub website, click on you repository of interest.
  2. Locate the green button named Code and click on it. The GitHub URL will appear.
  3. Copy the GitHub URL.
  4. Open a Git client such as the BASH shell or GitHub Desktop on your local machine.
  5. Use the GitHub URL to clone the remote repo.

Once the remote repository is cloned, you can pretty much forget about the GitHub URL. Git saves the URL for you, so all future push and pull commands will know which remote repo to to interact with.

find GitHub URL

Once you fnd the GitHub URL of the remote repo you can use it to clone the repository locally.

GitHub URL examples

For most clone operations, the HTTPS based GitHub URL is all that is needed. That is the one that is shown by default on the repository page. But it actually comes in three flavors: HTTPS, SSL and GitHub CLI.

Your intro to GitHub Actions training course

Here’s how to get started with GitHub Actions:

Follow these tutorials and you’ll learn GitHub Actions fast.

Here’s what the three GitHub URLs look like if you were to copy each of them:

  • https://github.com/cameronmcnz/rock-paper-scissors.git
  • git@github.com:cameronmcnz/rock-paper-scissors.git
  • gh repo clone cameronmcnz/rock-paper-scissors

Clone with the GitHub URL

With the GitHub URL in hand, the clone operation is relatively simple. Sometimes Windows developers are reluctant to open up the BASH shell that comes pre-packaged with a Git installation, but it’s really worth overcoming that fear with Git. Here’s the command you would use in BASH to clone the GitHub repository referenced by the HTTPS GitHub URL above:

git clone https://github.com/cameronmcnz/rock-paper-scissors.git

When that Git clone command executes, the GitHub URL will be used to copy all of the remote files, along with the entire commit history, to the local developer machine. From there, a developer can perform as many local commits, fetch and push operations as they need.

clone GitHub URL

The GitHub URL is easily copied and used in Git GUI client tools.

And that’s how you find and use the GitHub URL.

 

 

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchAppArchitecture

SearchSoftwareQuality

SearchCloudComputing

SearchSecurity

SearchAWS

Close