0% found this document useful (0 votes)
40 views5 pages

Github Remote URL

This document provides steps to change the remote URL of a local Git repository to a GitHub repository URL. It details logging into GitHub, finding the repository, copying the SSH URL, and using Git commands like 'git remote add' and 'git push' to link the local and remote repositories.

Uploaded by

Dick Mabhida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views5 pages

Github Remote URL

This document provides steps to change the remote URL of a local Git repository to a GitHub repository URL. It details logging into GitHub, finding the repository, copying the SSH URL, and using Git commands like 'git remote add' and 'git push' to link the local and remote repositories.

Uploaded by

Dick Mabhida
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

le

of E ctrica
ol l School of Electrical and Information Engineering
o

an
Sch

d
University of the Witwatersrand, Johannesburg
Inf

in g

ELEN3009 – Software Development II


or

er

m e
ati
on E n gin

Changing the Remote URL

This tutorial demonstrates how to change the URL of the remote repository. Right now you
have a local repository on your computer but it doesn’t have the address to the remote one on
www.github.com. Follow the steps below carefully to add the GitHub remote repository.

Step 1
Login to GitHub and visit the following url:
https://github.com/witseie-elen3009-2016/
In the repositories section you should see your repository (see Figure 1 below), click on it.

Figure 1: Click on your repository.

remote.tex Ver. 3.141592 – July 13, 2016 Page 1 of 5


Step 2
On the right side of the screen you should see a green button that says Clone or download
(see Figure 2 below), click this button.

Figure 2: Click the “Clone or download” button.

remote.tex Ver. 3.141592 – July 13, 2016 Page 2 of 5


Step 3
A small window should have dropped down after clicking on this green button and in this window
you should see a URL among other things. DO NOT COPY THIS URL! Click the link that
says “Use SSH” (see Figure 3 below).

Figure 3: Click the “Use SSH” link.

remote.tex Ver. 3.141592 – July 13, 2016 Page 3 of 5


Step 4
The URL changes when you click on the “Use SSH” link, it now starts with git@ as opposed to
https://. Copy this new URL (see Figure 4 below).

Figure 4: Copy the SSH link.

remote.tex Ver. 3.141592 – July 13, 2016 Page 4 of 5


Step 5
If you’ve followed the Git installation guide correctly (https://www.youtube.com/watch?v=
jYtEuJjpsMY&feature=youtu.be) you should be able to use Git from the command prompt.
Open command prompt and navigate to your local repository. Now run the following lines where
you replace [email protected]:witseie-elen3009-2016/001122-Surname-001122-Surname.
git with the link that you copied in Step 4:
git remote add origin git@github . com : witseie - elen3009 -2016/001122 - Surname
-001122 - Surname . git
git remote set - url origin git@github . com : witseie - elen3009 -2016/001122 - Surname
-001122 - Surname . git
git push -u origin master

Figure 5 is a demonstration of the use of these commands in command prompt. NOTE: If


the first command has an error that is not a big deal, only the second and third
commands are important.

Figure 5: The commands that you enter into command prompt once you have navigated to the
local repository.

remote.tex Ver. 3.141592 – July 13, 2016 Page 5 of 5

You might also like