medium-to-own-blog: Error when the folder is already a git repo

? URL of the repository https://github.com/bradbarrish/bradbarrish-blog
⠋ Updating the project to use the repository URL
Error: Command failed: git init && git remote add origin https://github.com/bradbarrish/bradbarrish-blog && git add . && git commit -m "first commit :tada:"
fatal: remote origin already exists.

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:200:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 128,
  signal: null,
  cmd: 'git init && git remote add origin ' +
    'https://github.com/bradbarrish/bradbarrish-blog && git add . && git ' +
    'commit -m "first commit :tada:"',
  stdout: 'Reinitialized existing Git repository in ' +
    '/Users/brad.barrish/bradbarrish-blog/.git/\n',
  stderr: 'fatal: remote origin already exists.\n'
}

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Ah interesting. Could you open another issue? It’s a bit different from this one

No let’s keep it open and do this:

  • check at the beginning if the folder already exists, and if so ask if we should continue
  • If we continue, then we can just ignore errors on git init and git remote add
  • we should also perhaps change the commit message to not be First commit.