http://stackoverflow.com/questions/1745464/git-commit-problems
Short answer:
git push -u origin master
Longer answer:
You're most likely trying to push commits to a branch that wasn't created yet - for example, on a newly created Github repository without the README file automatically created. By calling
git push -u origin master, you specify both the remote that you need to push to (origin, which is usually the git default) and the branch (master, also default in typical cases). According to the git documentation:
-u, --set-upstream For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands. For more information, see branch..merge in git-config(1).
本文解答了在使用Git进行版本控制时遇到的问题:如何正确使用git push命令来推送本地commit到远程分支。通过实例演示,帮助开发者避免常见的错误,并确保代码同步的准确性。
2323

被折叠的 条评论
为什么被折叠?



