There are two do this:
1st:-
git remote set-url <name> <newurl>
example:-
git remote set-url origin [email protected]:username/test.git
2nd:-
What you need to do is change your 'origin' setting.you edit .git/config in your project root, something like this:
...
[remote "origin"]
url = git://[email protected]/git/repos/path
fetch = +refs/heads/*:refs/remotes/origin/*
...
or if your 'remote' is actually local:
...
[remote "origin"]
url = /path/to/repos/on/this/machine
fetch = +refs/heads/*:refs/remotes/origin/*
...
All you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.