本地执行
ssh-keygen -t rsa
获取rsa.pub 公钥,添加到git服务器才可上传和提交文件
git clone https://github.com/guoguicheng/testGit.git
当前目录打开命令行执行
git init
git config --global user.name='xxx'
git config --global user.email='xxx'
git add .
git commit -m 'first commit'
git remote add origin https:://github.com/guoguicheng/testGit.git
git push -u origin master
#.gitignore 添加忽略文件
git rm -r --cached .
git add .
#解决git上传慢的问题,删除http上传方式使用ssh上传方式
git remote rm origin
git remote add origin git@github.com:Liutos/foobar.git