1、右键要上传的项目,选择Git Bash Here
2、输入下面的命令
git config --global user.name "jiangjiang"
git config --global user.email "18963624347@163.com"
git init
git remote add origin http://192.168.2.142/JIANGJIANG/test.git
git add .
git commit -m "程序源代码" //此名字自己设置
git push -u origin master
注意上处中git remote add origin http://192.168.2.142/JIANGJIANG/test.git 要用http不要用ssh 否则代码上传失败。