Error when “git push” to github

Perhaps try:

git push [email protected]:{username}/{projectname}.git HEAD:test

The format of the last parameter on that command line is a refspec which is a source ref followed by a colon and then the destination ref. You can also use your local branch name (my_test) instead of HEAD to be certain you’re pushing the correct branch.

The documentation for git push has more detail on this parameter.

Leave a Comment