【问题标题】:why git add commad not works?为什么 git add 命令不起作用?
【发布时间】:2023-02-23 17:53:30
【问题描述】:

我试图在 github 上推送文件,但它给了我这样的错误。

警告:在工作副本中

.dart_tool/dartpad/web_plugin_registrant.dart', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.dart_tool/flutter_build/5858a742c42e73c8f0e5b45ebdff649f/kernel_snapshot.d', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.dart_tool/package_config.json', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.dart_tool/package_config_subset', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of '.gitattributes', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'analysis_options.yaml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/.gitignore', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/build.gradle', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/debug/AndroidManifest.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/AndroidManifest.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/kotlin/com/example/lgoin_ui/MainActivity.kt', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/res/drawable-v21/launch_background.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/res/drawable/launch_background.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/res/values-night/styles.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/main/res/values/styles.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/app/src/profile/AndroidManifest.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/build.gradle', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/gradle.properties', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/gradle/wrapper/gradle-wrapper.properties', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/lgoin_ui_android.iml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'android/settings.gradle', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'build/app/generated/source/buildConfig/debug/com/example/lgoin_ui/BuildConfig.java', LF will be replaced by CRLF the next time Git touches it

我正在尝试在 github 上添加我的代码

【问题讨论】:

  • 这回答了你的问题了吗? Git replacing LF with CRLF
  • 兄弟,我可能会建议你使用 GithubDesktop。不需要写任何命令

标签: flutter dart user-interface


【解决方案1】:

您可以尝试此命令 git config --global core.autocrlf false 在此答案中推荐 In this question

【讨论】:

    最近更新 更多