git config --global user.name "你的名字或昵称"
git config --global user.email "你的邮箱"
git init
git remote add origin <你的项目地址> //注:项目地址形式为:http://git.oschina.net/xxx/xxx.git或者 git@git.oschina.net:xxx/xxx.git
git pull origin master
git touch init.txt //如果已经存在更改的文件,则这一步不是必须的
git add .
git commit -m "第一次提交"
git push origin master