【问题标题】:How can I avoid CRs in files in Git/IntelliJ on Windows?如何避免 Windows 上 Git/IntelliJ 文件中的 CR?
【发布时间】:2018-08-28 03:14:09
【问题描述】:

我收到了/bin/bash^M: bad interpreter: No such file or directory 我知道这里有多个帖子:

/bin/sh^M: bad interpreter: No such file or directory

https://askubuntu.com/questions/304999/not-able-to-execute-a-sh-file-bin-bashm-bad-interpreter

How to change line-ending settings

https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

我正在 Windows 机器上开发并尝试在 Linux 机器上运行。 我尝试了以下方法: git config --global core.autocrlf true intellij 终端 在intellij屏幕右下角设置LF

仍然出现同样的错误。 很抱歉重新发布,找不到任何其他修复?

GIT:https://github.com/BillyCharter87/Tech-O-Dex-API/blob/master/scripts/runapp.sh 谢谢

【问题讨论】:

  • 试试man dos2unix
  • 我正在部署到 AWS EC2,所以我需要在 git 中已经存在的现有脚本上运行该新脚本?
  • 祝你好运。下次尝试在问题中表达这一点。

标签: linux windows bash carriage-return linefeed


【解决方案1】:

您可以在 Linux 中使用vitouchnano 创建脚本文件,不要在 Windows 中创建文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-01-17
    • 2014-11-01
    • 2019-01-31
    • 2014-12-20
    • 1970-01-01
    • 1970-01-01
    • 2010-12-31
    • 2012-12-09
    相关资源
    最近更新 更多