简体   繁体   English

如何在Windows上的Git / IntelliJ中避免文件中的CR?

[英]How can I avoid CRs in files in Git/IntelliJ on Windows?

I'm getting the /bin/bash^M: bad interpreter: No such file or directory I know there are multiple posts for this as seen here: 我得到了/bin/bash^M: bad interpreter: No such file or directory我知道这里有多个帖子:

/bin/sh^M: bad interpreter: No such file or directory / bin / sh ^ M:解释错误:没有这样的文件或目录

https://askubuntu.com/questions/304999/not-able-to-execute-a-sh-file-bin-bashm-bad-interpreter 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 https://git-scm.com/book/zh/v2/Customizing-Git-Git-Configuration

I'm devloping on a windows machine and trying to run on a Linux machine. 我正在Windows机器上开发并试图在Linux机器上运行。 I've tried the following: git config --global core.autocrlf true in intellij terminal Setting LF on the bottom right of the intellij screen 我尝试了以下操作: git config --global core.autocrlf true在intellij终端中为git config --global core.autocrlf true在intellij屏幕的右下角设置LF

Still getting same error. 仍然出现相同的错误。 i'm sorry about reposting, can't find any other fixes? 我很抱歉重新发布,找不到其他修复程序?

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows的Git Bash上使“ man”或“ nano”可用? - How can I make “man” or “nano” available on Git Bash on Windows? 如何使用git在本地主机和服务器之间复制文件? - How can I copy files between localhost and server using git? 比较两个文件夹时如何避免.git文件 - How to avoid .git files when comparing two folders 我如何才能使用Linux上现在已安装在Windows 7上的预装Intellij Idea? - How can i use a pre installed Intellij Idea that was installed on Windows 7 now on linux? 如何删除旧的 Gradle 文件和 IntelliJ 在 Linux 上下载的 JDK? - How can I delete old Gradle files and JDKs downloaded by IntelliJ on Linux? 如何避免日志文件出现乱码并运行后台进程? - How can I avoid log files being garbled and to run background processes? 如何使用Git for Windows更改Git Bash中的目录? - How do I change the directory in Git Bash with Git for Windows? 我如何帮助git for Windows更好地处理Linux Samba共享上的存储库? - How can I help git for Windows better handle a repository sitting on a Linux Samba share? 如何在 Windows 上为本地 git 存储库设置 LF 行结尾? - How can I set LF line endings for local git repository on Windows? 如何使用无效的 Windows 文件名处理在 Linux 上提交给 Git 的文件? - How to handle files committed to Git on Linux with invalid Windows filenames?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM