question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when the folder is already a git repo

See original GitHub issue
? 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'
}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mathieudutourcommented, Jun 5, 2019

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

1reaction
mathieudutourcommented, Jun 2, 2019

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.
Read more comments on GitHub >

github_iconTop Results From Across the Web

"This directory appears to be a Git repository" error?
There error is telling you that the location you're choosing to create a new repo already is one. Perhaps you could choose a...
Read more >
Solving “Fatal: Not A Git Repository” (Or Any Of The Parent ...
In this article, we will explore what causes, how to prevent, and how to solve the “fatal: not a git repository” error.
Read more >
Git error - Fatal: Not a git repository and how to fix it | Datree.io
This error means you attempted to run a Git command, but weren't inside a Git repository. Make sure you've: Navigated to the right...
Read more >
fatal: not a git repository (or any of the parent directories): .git
What the error is telling you is that you issued a Git command, (usually within a command line shell), inside a directory that...
Read more >
How to Fix the “fatal: not a git repository” Error - ContainIQ
Check that you correctly created the repo. If the directory doesn't contain a .git repo, use git init to properly initialize the repo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found