相关疑难解决方法(0)

如何在Git中仅提交区分大小写的文件名更改?

我已经改变了被命名一些文件去首字母大写,如Name.jpgname.jpg.Git无法识别此更改,我不得不删除文件并再次上传.在检查文件名的变化时,Git是否有区分大小写的方法?我没有对文件本身进行任何更改.

git case-sensitive git-config git-commit

1157
推荐指数
15
解决办法
25万
查看次数

git mv并且只更改目录的大小写

虽然我发现了类似的问题,但我找不到问题的答案

当我尝试将目录从FOO重命名为foo时,git mv FOO foo我得到了

fatal: renaming 'FOO' failed: Invalid argument
Run Code Online (Sandbox Code Playgroud)

好.所以我试试git mv FOO foo2 && git mv foo2 foo

但当我尝试通过git commit .我得到

# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# foo
nothing added to commit but untracked files present (use "git add" to track)
Run Code Online (Sandbox Code Playgroud)

当我通过git add foo无变化添加目录并git commit .再次给我相同的消息.

我究竟做错了什么?我以为我使用区分大小写的系统(OSX)为什么我不能简单地重命名目录?

git macos version-control case-sensitive

250
推荐指数
7
解决办法
7万
查看次数

TypeScript,从自制包导入模块时tsconfig.json出错

我需要在 Node 项目之间共享一些功能,所以我在我的 Github 帐户中创建了一个私有存储库,然后将其添加到一个新项目中:

$ yarn add git+ssh://git@github.com:my_gh/my-api-types.git --dev
Run Code Online (Sandbox Code Playgroud)

我可以在node_modules/my-api-types目录中看到代码,我可以使用以下命令导入代码:

import { AccountResolvers } from "my-api-types";
Run Code Online (Sandbox Code Playgroud)

VS Code 不会发送任何错误消息,实际上 IDE 会正确显示 AccountResolvers 中的方法。但是当我想编译项目时,我得到:

ERROR in /home/manuel/customer-service/tsconfig.json
[tsl] ERROR
    TS6307: File '/home/manuel/customer-service/node_modules/my-api-types/src/features/account/account.graphql.ts' 
    is not in project file list. Projects must list all files or use an 'include' pattern.
Run Code Online (Sandbox Code Playgroud)

我的tsconfig.json的错误地址,但我在其他项目中使用相同的文件没有问题:

  {
   "compilerOptions": {
    "composite": true,
    "target": "es2016",
     "module": "commonjs",
     "moduleResolution": "node",
     "esModuleInterop": true,
     "outDir": "./dist/",
     "noImplicitAny": true,
     "skipLibCheck": true,
     "jsx": "react",
     "moduleResolution": "node",
     "noFallthroughCasesInSwitch": true,
     "forceConsistentCasingInFileNames": true, …
Run Code Online (Sandbox Code Playgroud)

typescript

8
推荐指数
1
解决办法
3473
查看次数

Angular 应用程序无法使用 GitHub Actions 构建(“找不到模块”)

我可以在本地构建我的项目(使用我的 GitHub Action 使用的相同构建命令)。但是,在管道中运行时失败,并出现以下错误(还有更多,但基本相同的错误)。

ERROR in src/app/root-store/actions.ts:3:32 - error TS2307: Cannot find module '../shared/models/view-models/NewUserRequest'.

3 import { NewUserRequest } from '../shared/models/view-models/NewUserRequest';
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/root-store/frame-store/actions.ts:3:41 - error TS2307: Cannot find module 'src/app/shared/models/requests/FrameRequests'.

3 import { CreateFrameImageRequest } from 'src/app/shared/models/requests/FrameRequests';
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/shared/models/translators/frameTranslator.ts:4:61 - error TS2307: Cannot find module '../requests/FrameRequests'.
Run Code Online (Sandbox Code Playgroud)

它无法解析我导入到组件中的某些文件。它说“找不到模块”,但这些只是打字稿接口文件,它们不在模块中。我是 GitHub Actions 的新手,真的不知道如何开始调试此类问题。

这是我的 actions.yml 文件

# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the action will run.
on:
  # Triggers the workflow …
Run Code Online (Sandbox Code Playgroud)

git typescript angular github-actions

6
推荐指数
1
解决办法
2636
查看次数