1. Create a warehouse (most of them can be left blank)
2. Delete the .git folder
3. Execute the initialization command (initially out of the .git folder)
Execute the command under the local project
git init
Fourth, establish a relationship with the remote warehouse
git remote add origin ssh://[email protected]:61022/shengbaitong/inst_ops1.git
5. Add files
If it is the first time to use this computer to create new warehouses on these three platforms. This step is necessary, because you have to add and submit the file, otherwise an error will be reported when merging at the end
git add .
6. Submit
git commit -m "第一次提交"
7. Merge (see what branch you have established)
git push -u origin main/master
8. The user name and password will be entered for the first submission of the new warehouse on the new platform
If the password is wrong, go to Control Panel - Account - Windows Credentials Change
Nine, related error
1. Execute git push -u origin main/master to report an error
error: src refspec main does not match any error: failed to push some refs to “”
error: src refspec main does not match any error: failed to push some refs to “”
1. The reason may be that the code is submitted on a new computer for the first time
2. The default master branch of github has quietly changed to the main branch