mbostock / gistup

Create a gist from terminal, then use git to update it.
Other
488 stars 41 forks source link

Fails to push files to remote origin #42

Closed janicekchen closed 3 years ago

janicekchen commented 3 years ago

Hello! I've been trying to use gistup on my new computer and I'm fairly sure I've set everything up right...but after it says the gist has been created, it throws this error and doesn't push any of my files. I end up having an "empty" gist with just a .gistup file in it.

I can't figure this out and I'm not sure how to ask this in a way that can help you help me! What other information do you need?

Thank you, Janice

gist eecafd72e2b8eaf5db1edfdc7c7339db created!
https://gist.github.com/eecafd72e2b8eaf5db1edfdc7c7339db
/Users/f002bjt/.nvm/versions/node/v15.2.1/lib/node_modules/gistup/lib/gistup/unless.js:11
    throw error;
    ^

Error: Command failed: git push -fu 'origin' main
error: src refspec main does not match any
error: failed to push some refs to 'git@gist.github.com:eecafd72e2b8eaf5db1edfdc7c7339db.git'

    at ChildProcess.exithandler (node:child_process:309:12)
    at ChildProcess.emit (node:events:329:20)
    at maybeClose (node:internal/child_process:1055:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: "git push -fu 'origin' main"
}
mbostock commented 3 years ago

Duplicate of #40.

janicekchen commented 3 years ago

Ah — I'm sorry, I still have this problem. Is there a reason this shouldn't be working even though I have the latest version of gistup installed?

janicekchen commented 3 years ago

Oop, never mind. I changed the gistup script on my local terminal back to using "master" as the default branch (as it was pre-350dac commit) and it appears to be working again.