- Run the command in the local warehouse
[email protected] MINGW64 /d/learngit (master) $ git remote add origin [email protected]:usename/xxx.git
- If there is an error
error: remote origin already exists.
[email protected] MINGW64 /d/learngit (master) $ git remote rm origin //remove and then continue...
- Pull remote update push
- //After the first remote association, you must first pull a remote update.
Admin[email protected] MINGW64 /d/learngit (master) $ git pull
- Push local library to remote
[email protected] MINGW64 /d/learngit (master) $ git push -u origin master
- Note: Add -u to the first push to facilitate future push or pull
git push origin master
Similar Posts: