windows中换行符CRLF,而在Linux下的换行符为LF,所以在执行add.时出现错误:
$rm -rf .git
$git config --global core.autocrlf false //禁用自动换行
重新初始化仓库:
$ git init
$ git add.
远程仓库地址错误
remote: This repository moved. Please use the new location [new location]
解决命令:
git remote -v
git remote rm origin
git remote add origin 远程地址
##git文件修改而本地没有修改
! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 出现错误:
本地需要pull代码,更新成最新的,
解决命令:
- git pull --rebase origin master