Fixing Error Fatal: Origin does not appear to be a Git Repository



RECOMMENDED: Click here to fix Windows errors and optimize system performance

By default, a Git repository is not assigned to a remote repository. If you try to push changes to a remote repository without first specifying its location, the error “fatal:” origin “is not a Git repository.”

This guide explains why this error occurs and what it means. We’ll look at an example of this error so you can figure out how to fix it.

fatal: origin doesn’t look like a Git repository
The git init command creates a new Git repository. This command only initializes the folder as a Git repository. The repository is not associated with the remote repository.

In contrast, the git clone command links the local repository to the remote repository. This is because Git knows where the code in the project is coming from and uses the cloned location to guess where you are going to move the commits.

The “fatal:” origin “does not look like a Git repository” error occurs when you set up a new repository and try to commit code without telling Git first where to move the code.

Add Origin

If Origin (which points to Fork) is missing, some commands may not work correctly. So in this step we will manually add the origin. Do it:

  • Press Command + Spacebar at the same time.
  • Type “Terminal” and press Enter.
  • Enter the following command and press Enter.
  • Git Remote -v
  • Check if a remote named “Origin” is listed.
  • Otherwise, it means that your “origin” is missing.
  • Add source using below command
  • Git Remote Add source url / to / your / fork
  • Check if the problem persists.


June 2021 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



Change url

If you enter the URL incorrectly, some functions of the application may not work correctly. Therefore, in this step, we change the url. Hence:

  • Press Command + Spacebar at the same time.
  • Type “Terminal” and press Enter.
  • Use the following command to change the url
  • git remote source set-url ssh: //[email protected]/username/newRepoName.git
  • Check if the problem persists.

Remote warehouse name

When I use git to submit the push code, I get the error “Fatal:” Origin “doesn’t look like a Git repository …”.

  • $ git push -u original master
  • fatal: “origin” doesn’t look like a Git repository
  • Serious: Unable to read from a remote repository.

Since the source of the vault name does not exist remotely, you can use the following working methods to display the remote vault name and path information, remove the name from the wrong remote store, and add a new remote store.

Git remote – V: To view detailed information about a remote warehouse, you can view the name of the repository.

Git remote remove orign: remove the source warehouse (if the source is written as orign, remove the warehouse with the wrong name)

Git Remote Add Origin Warehouse Address: add the remote warehouse address again

GTI-Push-U-Origin Master: The main storage that was sent to a remote warehouse



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance