How to Fix ‘Fatal: Origin does not appear to be a Git Repository’ Error

Git is a distributed version control system which is primarily used to track changes in source code during software development. GitHub is an online hosting service for version control using Git. Both these services are used extensively in Software Development. However, quite recently, a lot of reports have been coming in where users are unable to execute “git” commands in their Mac Terminal.

Fatal: ‘origin’ does not appear to be a Git Repository Error

In this article, we will talk about the reasons due to which the error is triggered and provide you with viable solutions to fix the issue. Make sure to follow the guide carefully in order to avoid conflicts.

What Causes the “Fatal: ‘origin’ does not appear to be a Git Repository” Error?

After receiving numerous reports from multiple users we decided to investigate the issue and started identifying its root cause. According to our reports, the reasons due to which this error is triggered is listed below:

  • Missing Origin: This error is usually seen when the “Origin” is missing. Origin is the reference to “Github-Fork” and if missing, some commands don’t work properly.
  • Incorrect URL: In some cases, the URL configuration set by the application might be false and it might have to be changed. Due to which, some commands might not be working properly.

Now that you have a basic understanding of the nature of the problem, we will move on towards the solutions.

Solution 1: Adding Origin

If Origin (that references to Fork) is missing certain commands might not work properly. Therefore, in this step, we will be adding an Origin manually. In order to do that:

  1. Press the “Command” + “Space” buttons simultaneously.
  2. Type in “Terminal” and press “Enter“.
    MacOS Terminal
  3. Type in the following command and press “Enter
    git remote -v
  4. Check to see if there is a remote named “Origin” listed.
  5. If not, it means that your “Origin” is missing.
  6. Add Origin using the following command
    git remote add origin url/to/your/fork
  7. Check to see if the issue persists.

Solution 2: Changing URL

If the URL is not referenced correctly it might prevent certain functions of the application from working properly. Therefore, in this step, we will be changing the URL. For that:

  1. Press the “Command” + “Space” buttons simultaneously.
  2. Type in “Terminal” and press “Enter“.
    MacOS Terminal
  3. Use the command below to change the URL
    git remote set-url origin ssh://git@github.com/username/newRepoName.git
  4. Check to see if the issue persists.

Solution 3: Changing Origin to Master

If you are trying to pull from Master, it is necessary to change the origin to master before trying to add or remove the remote. Therefore, in this step, we will be changing the Origin to Master. For that:

  1. Press the “Command” + “Space” buttons simultaneously.
  2. Type in “Terminal” and press “Enter“.
    MacOS Terminal
  3. Use the command below to change the Origin to master
    git pull origin master

Expert Tip

How to Fix ‘Fatal: Origin does not appear to be a Git Repository’ Error

If the issue is with your Computer or a Laptop you should try using Reimage Plus which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Reimage by clicking the Download button below.

Download Now

I'm not interested

Close