0

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?

1 Answer 1

2
git push origin -u HEAD 

HEAD is a valid ref, head is not.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.