I am new to Git/GitHub and ran into an issue. I created a test project and added it to the local repository. Now I am trying to add files/project to the remote repository.>
Mark Longair's solution using git remote set-url... is quite clear. You can also get the same behavior by directly editing this section of the .git/config file:
before:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/my_user_name/my_repo.git
after:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:my_user_name/my_repo.git
(And conversely, the git remote set-url... invocation produces the above change.)