Clone and pull fail on Windows if the name of files in the repository contains backslashes


アトラシアン コミュニティをご利用ください。


プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。



It is possible for a user on Linux, UNIX or MacOS X to create and commit a file to a repository whose name contains a backslash. If a user on a Windows machine tries to clone or pull from that repository, the operation will fail with an error stating No such file or directory. This error also occurs when using SourceTree.



  • A Windows-based git client (either git on the command line or via SourceTree) is used to clone or pull from a repository

Diagnostic Steps

  • When running git clone or git pull the operation fails with an No such a file or directory error being displayed.
  • The repository that is being cloned contains a file whose name contains a backslash, e.g. Some\File.txt 


Backslashes are special characters on Windows operating systems since they are used to separate paths (e.g. C:\Windows\System32). They are therefore considered invalid characters for filenames on Windows. 


To resolve the problem, the file whose name contains a backslash needs to be removed from the repository. Follow these steps to remove the file from the repository.

  1. Clone the repository using a Linux, UNIX or MacOS X machine
  2. Delete the offending file (or rename it so its name no longer contains a backslash)
  3. git add --all を実行します
  4. git commit を実行します

You should now see from the Bitbucket Server web interface that the file with the backslash in its name is gone (or has been renamed). The clone or pull operation should now succeed on Windows clients.

最終更新日 2016 年 8 月 2 日


Powered by Confluence and Scroll Viewport.