0

Having trouble pushing my commit to github.

Was having super weird node.js behavior and found the solution was to revert back a commit and then manually overwrite my project with Github's zip download.

That worked for solving my weird node.js behavior but now I can't get GitHub to take the current commit as it's not the head?

My tries:

$ git push origin test-branch
error: src refspec test-branch does not match any.
error: failed to push some refs to 'https://github.com/name/project.git'

$ git push --force origin master:master
Everything up-to-date

$ git push origin HEAD:refs/heads/master
To https://github.com/name/project.git
! [rejected]        HEAD -> master (non-fast-forward)

Any way to save me?

Chris Chevalier
  • 620
  • 1
  • 7
  • 20

1 Answers1

2

Your test-branch is not on remote, you need to use -u option :

git push -u origin test-branch

ref How do you create a remote Git branch?

Community
  • 1
  • 1