I have created a remote repo using my GitHub account at https://github.com/darKoram/sphero_tracker.git. So far it just contains some wiki pages, but I\'m ready to upload my
The original poster's original question says:
I use
git push origin git@github.com:/darkoram/shpero_tracker.git
I also tried
git push origin https://github.com/darKoram/sphero_tracker.git
both times I get
remote part of refspec is not a valid name in https://github.com/darKoram/sphero_tracker.git
The error refers to the fact that you're not using a valid refspec. A refspec takes the following form (items in []
are optional, and items in <>
are parameters):
[+]
In the format above, both the source and the destination are references, and branches in Git are references, so you can use branches as refspecs. For example, the following are both valid and equivalent refspecs:
master
master:master
Using the two refspecs with git push
:
git push origin master
git push origin master:master
will both push the local branch master
to the branch named master
on the remote origin
.
You used
git push origin git@github.com:/darkoram/shpero_tracker.git
git@github.com:/darkoram/shpero_tracker.git
is not a vaid reference/branch, it's the URL for your remote repo. That's probably why Git is complaining that the refspec is not valid.
The correct way to push a branch would be
git push origin