初始化git,并上传gitee
全局设置
git config --global user.name "***"
git config --global user.email "****@qq.com"
创建 git 仓库
mkdir demo-gen //创建文件夹
cd demo-gen //切换至文件夹目录
git init //初始化git
touch README.md //创建README
git add README.md //添加README
git commit -m "first commit" //提交
git remote add origin git@gitee.com:aaa/bbb.git //连接至gitee远程仓库
git push -u origin master //push 到master分支
git 常见问题记录
- The file will have its original line endings in your working directory
解决方案:
git config –-global core.autocrlf false