git mktree fatal: path .github/CODEOWNERS contains slash
Related to: In Windows Git Sparse Checkout does not work as expected and downloads unwanted files
I am on Windows 11 and I am trying to make a custom commit tree from git ls-tree
Commands:
git ls-tree -r --full-tree needed_branch > commit.tree
Even without editing the commit.tree file if I do the following:
git mktree < commit.tree
It fails with :
fatal: path .github/CODEOWNERS contains slash
Please note that I have not even edited the commit.tree file at this point.
The commit.tree file:
100644 blob cc8416e15b764a014816b43e74a0a84886105f85 .env
100644 blob 31777776105a7584391abc637596670529205c9c .github/CODEOWNERS
100644 blob 5cf9ab7fd6aa4099fd8a11b17f0e9a72163b9a0a .github/workflows/blob-storage.yml
100644 blob fe180d597c794870771c2cfcf6c66ed26ce8d8f5 .github/workflows/ci.yml
100644 blob 6f14fa332fa8bd1be1bcc5ab2ba1b0ebaf19c65d .github/workflows/pr-check.yaml
100644 blob 7a0f88e0f5c80d52029bd6031a9ea1128432268c .github/workflows/promote-image-ocm-dataflow-dags.yml
100644 blob fef6efcb2fa7d2c998ecafbb8dc0f287e3ac2a32 .github/workflows/promote-secrets.yml
100644 blob 6b4c35079cf3598eb0cb676f6dac447f6d05e2f9 .github/workflows/techdocs-cd.yml
100644 blob 97258e74f0f4415a9a134de41e3a07c6e7f4c4af .github/workflows/upload-blob-storage-dev.yml
100644 blob cc2221c29eb1f17edf08a27db1055bfaf9db7026 .github/workflows/upload-blob-storage-poc-dev-analytics.yml
100644 blob 95058d021e9989825be66f91f3514209989c2167 .github/workflows/upload-blob-storage-prod.yml
100644 blob ba491a07a51f98cea6ac90d3b69edc11a3c4f148 .github/workflows/upload-blob-storage-stg.yml
100644 blob 486ffc1038b93b41460686633e2257f3eec90df9 .gitignore