1、 git init
2、 git remote add origin https://git.oschina.net/hongweizhiyuan/xxxxxx.git
3、 git add --all
4、 git commit -m "update"
5、 git pull origin master (如果报错,输入它)
6、 git push origin master (然后输入用户名和密码即可上传!)
原文:http://my.oschina.net/54programmer/blog/335232