GitBash common errors

1. No reaction $ git remote -v

Cause: Remote Storage is not created (there may be copied https address using the remote repository, and the original remote repository address is set ssh remote url address)

Solution: Create a remote repository can

$ Git remote add orgin (remote repository name) url (remote warehouse address ssh / https)   

Note: "url" does not need to be marked

2.

error:Unknown subcommand:origin

Remote repository origin does not exist (you need to create a remote repository)

3.

usage: git remote add [<options>] <name> <url>

Creating a remote repository format is incorrect


4 .. local repository push to a remote repository fails

error: failed to push some refs to 'https://github.com/Chouett/weatherstore.git'

The reason: 
README.md remote file repository GitHub repository is not local. 

solution:

(1)

$ git pull --rebase origin master

$ git push -u origin master

(2)

Forced push method: $ git push -u origin master -f many people work together is not recommended




Guess you like

Origin blog.csdn.net/qq_41850194/article/details/79786037