解决“fatal: 'origin' does not appear to be a git repository...”

When using Git for code push submission, the error message "fatal: 'origin' does not appear to be a git repository..." appears,

$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

It is because the warehouse name origin does not exist remotely. You can use the following operation methods to view the remote warehouse name and path related information, delete the wrong remote warehouse name, and re-add a new remote warehouse;

git remote -v: View the details of the remote warehouse, you can see the warehouse name

git remote remove orign: delete the orign repository (if origin is spelled as orign, delete the wrongly named repository)

git remote add origin warehouse address: re-add the remote warehouse address

Gti push -u origin master: commit to the master trunk of the remote repository

 

Reprinted in: https://www.cnblogs.com/xyfer1018/p/11493810.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326568912&siteId=291194637