Need to change Git URL for repository

List your existing remotes in order to get the name of the remote you want to change (notice we forgot to include .git on the end of the repository directory)

 

cd project
git remote -v
origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY (fetch) 
origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY (push)

 

Change your remote’s URL  with the git remote set-url command.

git remote set-url origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git

 

Verify that the remote URL has changed.

git remote -v
# Verify new remote URL
origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git (fetch) 
origin ssh://USERNAME@SERVER/HOME/USERNAME/REPOSITORY.git (push)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s