git遇到的问题

Posted chenguifeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git遇到的问题相关的知识,希望对你有一定的参考价值。

warning: LF will be replaced by CRLF in about/index.html.
The file will have its original line endings in your working directory

原因是存在符号转义问题;windows的换行符为CRLF,Linux下的为LF。执行:

 git config --global core.autocrlf false 

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull ...‘) before pushing again.
hint: See the ‘Note about fast-forwards‘ in ‘git push --help‘ for details.

勾选了 Initialize this repository with a README这项,导致远程仓库不为空,解决办法,先将远程仓库的内容合并到本地,然后再上传即可,命令如下:

 git pull --rebase origin master

git push -u origin master 

 

以上是关于git遇到的问题的主要内容,如果未能解决你的问题,请参考以下文章

git 添加远程仓库遇到的问题

学习git使用遇到的问题

git使用过程中遇到的问题及其解决办法

git 遇到的无法成功push的问题

VSCode使用git过程中遇到的问题

git遇到的问题