警告:LF 将在 .vscode/launch.json 中被 CRLF 取代
warning: LF will be replaced by CRLF in .vscode/launch.json
我有一个带有 reactjs 的 .net 核心应用程序。我正在使用 visual studio 代码我想执行 git 推送。
但后来我收到这个警告:
> git add -A -- .
warning: LF will be replaced by CRLF in .vscode/launch.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ReactActivities/.gitignore.
The file will have its original line endings in your working directory
error: 'ReactActivities/API/' does not have a commit checked out
fatal: adding files failed
这是我的 launch.json 文件:
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/ReactActivities/API/bin/Debug/net5.0/API.dll",
"args": [],
"cwd": "${workspaceFolder}/ReactActivities/API",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\bNow listening on:\s+(https?://\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
所以我现在不能提交。如何摆脱这个错误?
谢谢
我想您刚刚创建了一个空的存储库,所以您要做的就是在您的存储库中创建一个初始提交。
您的错误不是“LF 将被 CRLF 替换”。
您的错误是“'ReactActivities/API/' 没有签出提交”。
看看这个
我有一个带有 reactjs 的 .net 核心应用程序。我正在使用 visual studio 代码我想执行 git 推送。
但后来我收到这个警告:
> git add -A -- .
warning: LF will be replaced by CRLF in .vscode/launch.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ReactActivities/.gitignore.
The file will have its original line endings in your working directory
error: 'ReactActivities/API/' does not have a commit checked out
fatal: adding files failed
这是我的 launch.json 文件:
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/ReactActivities/API/bin/Debug/net5.0/API.dll",
"args": [],
"cwd": "${workspaceFolder}/ReactActivities/API",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\bNow listening on:\s+(https?://\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
所以我现在不能提交。如何摆脱这个错误?
谢谢
我想您刚刚创建了一个空的存储库,所以您要做的就是在您的存储库中创建一个初始提交。
您的错误不是“LF 将被 CRLF 替换”。
您的错误是“'ReactActivities/API/' 没有签出提交”。
看看这个