warning: LF will be replaced by CRLF in xxx;
- 直接执行这一句:
git config --global core.autocrlf false //禁用自动转换
$ git remote add origin git@github.com:xxxx 出现 :fatal: remote origin already exists.
1、$ git remote rm origin
2、$ git remote add origin git@github.com:djqiang/gitdemo.git 就不会报错了!
3、如果输入$ git remote rm origin 还是报错的话,error: Could not remove config section 'remote.origin'. 我们需要修改gitconfig文件的内容
4、找到你的github的安装路径,找到一个名为gitconfig的文件,打开它把里面的[remote "origin"]那一行删掉就好了
error:failed to push some refs to。
-
这个问题是因为远程库与本地库不一致造成的,那么我们把远程库同步到本地库就可以了。
使用指令- git pull --rebase origin master
-
这条指令的意思是把远程库中的更新合并到本地库中,–rebase的作用是取消掉本地库中刚刚的commit,并把他们接到更新后的版本库之中。