当前位置:   article > 正文

Git使用教程(四)git无法上传汇总_git cz暂存区无法提交

git cz暂存区无法提交

1、Git添加本地(git add .)缓存区无法提交

warning: LF will be replaced by CRLF in 
  • 1
warning: LF will be replaced by CRLF in catch/cms/database/migrations/20201111093349_cms_cate.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in catch/monitor/database/migrations/20200914203553_crontab.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in catch/sms/database/migrations/20200916172849_sms_config.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in catch/system/database/migrations/20201111172307_cate_config.php.
The file will have its original line endings in your working directory
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

出现原因:存在符号转义问题
windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示
解决方案

git config --global core.autocrlf false
  • 1

2、获取Git状态报错:

git status
  • 1
interactive rebase in progress; onto a3aafd6
  • 1

解决方案

git rebase --abort
  • 1

状态获取成功

Admin@DESKTOP-UDQ4GUV MINGW64 /f/Project/WEB/catchAdmin/new_catchadmin/catchAdmin (master|REBASE 1/1)
$ git rebase --abort

Admin@DESKTOP-UDQ4GUV MINGW64 /f/Project/WEB/catchAdmin/new_catchadmin/catchAdmin (master)
$ git status
On branch master
nothing to commit, working tree clean

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/765385
推荐阅读
相关标签
  

闽ICP备14008679号