Git push met when he arrived at GitHub.
1. Open git in the manage folder, type git init to initialize the local warehouse, and GitHub to create a remote warehouse manage
2. The following command is associated with local and remote repositories, * my user name
Git remote add origin git@github.com:**/manage.git
3. You already have the project code locally. After add and commit, you want to push to the remote warehouse.
Git push origin master
An error was reported at this time:
! [rejected] master-> master (non-fast forward)
.
.
After searching the Internet for a long time and entering all kinds of invalid and wrong commands, we finally found a solution:
1. Git pull origin master-- allow-unrelated-histories / / synchronizes the remote warehouse with the local one to eliminate differences
2. Re-add and commit the corresponding files
3 、 git push origin master
4. At this time, the upload will be successful.