Git问题

1.  LF will be replaced by CRLF

rm -rf .git  // 删除.git  
git config --global core.autocrlf false  //禁用自动转换    
git init    
git add . 

参考:  Git 警告 LF will be replaced by CRLF

2.  如果更改本地版本库代码后,直接推送到远程的话,报错:updates were rejected because the tip of your current branch is behind its remote counterpart 

 

版本冲突问题。参考:http://www.voidcn.com/article/p-ahyketjb-cd.html

 

推荐的解决方法:

 

  • 将远程的代码先拉取(pull)过来,与本地合并后再传上去。
$ git pull origin master
$ git push -u origin master

 

  • 不想合并的话,就创建新分支
$ git branch [name]
$ git push –u origin [name]

  

 

posted @ 2018-11-08 18:02  newer92  阅读(111)  评论(0编辑  收藏  举报