我所问的问题只是对我来说一个很大难题的第三步。Git - 提交失败,出现错误:分支是最新的,但实际上有更改要提交
- 所有的开始与.gitignore文件不工作。 我搜索了一下,发现在我的回购的顶部文件夹中输入
git rm -r --cached .
,然后在编辑我的.gitignore文件并提交一切应该已经工作后git add .
。 但是,当试图提交我收到了提交错误的一切(以及随之而来的失败)消息,由于警告:
LF will be replaced by CRLF
我还是那句话一派,:检查是否
core.autocrlf
是真实的(它是)并试图让警告消失git congif --global core.safecrlf false
。
这使我的第三和最后一步
当我想最后提交我的.gitignore更改我的回购协议,我从IDE收到:
Commit failed with error 0 files committed, 1462 files failed to commit: Fixes .gitignore
On branch develop Your branch is up-to-date with 'origin/develop'. nothing to commit, working directory clean
这一点,不过,我从git status
为我所有的1462个文件获得:
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes to be committed: (use "git reset HEAD ..." to unstage)
deleted: .idea/vcs.xml
modified: app/.gitignore
deleted: app/app.iml
deleted: app/build/generated/source/buildConfig/androidTest/debug/com/android_ application/adiuvapp_verbalatina/test/BuildConfig.java
我认为在这一点上,我应该使用git reset HEAD...
,但我真的不想搞乱任何东西!
我该如何解决这个问题?
因此,对于第3步,你提交从android工作室的变化?如果你从git bash提交更改会怎么样? –
它实际上解决了问题!没有尝试过这种解决方案,我感到非常愚蠢。 发表您的评论作为答案!你能解释一下为什么它以这种方式工作吗? –
是的,我刚才添加了一个答案,并解释了原因。 –