Help Center/ CodeArts Repo/ FAQs/ Uploading and Downloading Code/ Error "'origin' does not appear to be a git repository..." Is Reported When the Git Push Command Is Executed
Updated on 2024-11-14 GMT+08:00

Error "'origin' does not appear to be a git repository..." Is Reported When the Git Push Command Is Executed

Symptom

Error 'origin' does not appear to be a git repository... is reported when you run the following command:

git push --set-upstream origin feature1 

Analysis

origin does not appear to be a git repository.

Solution

Verify the name and path of the remote repository, delete the false name and add another remote repository. Run the following commands:

  1. Check the details of the remote repository, including its name and associated address.

    git remote -v

  2. Delete the false origin repository.

    git remote remove origin

  3. Add another remote repository address.

    git remote add origin

  4. Commit the code file to the master branch of the remote code repository again.

    git push -u origin master