全局配置
git config --global user.name "小狼" git config --global user.email "1142864319@qq.com"
创建新版本库
git clone https://git.XXX.com/XXX.git cd xxx touch README.md git add README.md git commit -m "add README" git push -u origin master
现有的文件夹或Git版本库
cd existing_folder git init git remote add origin https://git.xxx.com/xxx.git git add . git commit git push -u origin master
账号活密码输入错误修改办法
fatal: Authentication failed for '
你输入一次后,无论对错都不会再让你输入了
此时打开:控制面板\用户帐户和家庭安全\凭据管理器
上面会有你的全部git账号,可以点击编辑直接修改,也可以删除,再次git push会让你重新输入账号密码
报错warning: LF will be replaced by CRLF
warning: LF will be replaced by CRLF in
The file will have its original line endings in your working directory
git config --global core.autocrlf false
报错:error: Your local changes to the following files would be overwritten by merge:
Please commit your changes or stash them before you merge.
出现这个问题是别人修改的文件你在本地也做了修改,冲突了。
解决办法:
git stash
git pull
git stash pop