git remote add origin git@github.com:xxx/xxx.git
git push -u origin main
git push与git pull的默认行为
The -u tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.
“Upstream” would refer to the main repo that other people will be pulling from, e.g. your GitHub repo. The -u option automatically sets that upstream for you, linking your repo to a central one. That way, in the future, Git “knows” where you want to push to and where you want to pull from, so you can use git pull or git push without arguments.
git push与pull的默认行为,顶
What does git push -u mean?