Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general

How to fix fatal: origin does not appear to be a git repository

Sarvech Qadir

The fatal: ‘origin’ does not appear to be a git repository error occurs when you try to commit to a newly made git repository created using the git init command. This happens because git init does not link a local repository to a remote repository. You can check this by running:

git remote -v

If there is no remote repo called origin, you should try the following solution.

Solution

To fix the error, follow the steps below:

  • Inform Git of the location of the remote repository by running the following command:

    git remote add origin <remote_URL>
    

    where remote_URL is the link to the repository where you want your code to be stored.

  • Push your code by running the following command:

    git push origin master
    

RELATED TAGS

general

CONTRIBUTOR

Sarvech Qadir
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring