先设置你的用户名和邮箱号
git config –global user.name “Your Name”
git config –global user.email you@example.com
第一步:cd 到项目根目录,执行git init
第二步:git add . 后面的.是必须要加的
第三步:git commit -m “commit init”
第四步:git remote add origin 远程地址
第五步:git pull -u origin master
第六步:git push -u origin master 提交项目
//其他一些命令
1.git branch xxx //新建xxx分支
2.git push -u origin xxx //把代码提交到xxx分支
一个仓库要想别人也能提交代码,必须添加该仓库的collaborators(合作者)帐号