Skip to content

git clone not works with some ramdisk and ntfs #1405

Description

@yyjdelete
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.15.1.windows.2
built from commit: 5d5baf91824ec7750b103c8b7c4827ffac202feb
sizeof-long: 4
machine: x86_64
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [版本 10.0.17046.1000]

Also failed with some old stable versions of win10.

  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Nano
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Clone into an ramdisk which formated to NTFS.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

bash/cmd

  1. Install any ramdisk(like https://sourceforge.net/projects/imdisk-toolkit/, or you can install some others).
  2. Format the ramdisk to NTFS(FAT32 works well).
  3. Just clone anything on the ramdisk.
 git clone <any repository> <any dir on the ramdisk>
  • What did you expect to occur after running these commands?

Clone successful.

  • What actually happened instead?

Clone failed with the error message below, but the .git folder is created. Both git status and git checkout -f HEAD works.

fatal: This operation must be run in a work tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

** insert URL here **

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions