Reputation: 75
I'm trying to alias a push command so I don't have to type my branch name all the time, and I'm stalled at this step:
Git push new local branch to remote, without having to specify name
This command isn't working for me. I get:
$ git push origin -u head
error: src refspec head does not match any.
error: failed to push some refs to '[email protected]:hurtstotouchfire/repo.git'
This branch was created by cloning into the repo, then using git checkout -b
to create the new branch, making a commit, and then the push command above. Is there some config necessary to use this command?
Upvotes: 0
Views: 185