Is there any way to clone a git repository without a specific directory?

I just want to clone illumos-gate repository on my Windows machine. But unfortunately, there is an directory named ‘aux’ which is not allowed to be created in Windows since Windows regards aux as some device name. So is there any way to clone the whole git repository without this specific directory? Thanks in advance.

  • write puppet config to clone github repo
  • Merging master branch to another Git branch doesn't delete the files within branch
  • Organize LabVIEW in a git repository
  • Using conditional configuration files with Git
  • Undo Git Stash Pop
  • Can't find Git or Cordova on your path (Windows/Netbeans), Can't find GitHub under AppData/Local, FIX 2015
  • How to undo “add to Git repository” after creating an Xcode project?
  • Git: get the list of branches into which current branch was ever merged
  • Why I cannot git stage files when using git inside Transmit Disk feature?
  • How do I update my core project when using composer?
  • Dropbox > git commit
  • Commit shows up in history, changes are not in the file and don't show in individual file commit history
  • 3 Solutions collect form web for “Is there any way to clone a git repository without a specific directory?”

    I can only think of a way which is rather painful:

    Do a git clone without doing a checkout – git clone path --no-checkout

    Now do a git reset – git reset

    Now checkout every other file and folder except the aux one – git checkout master -- files/folders

    Don’t stage the deleted: aux/... changes

    Clearly, very painful. Only proper way is to clone and work on Linux.

    While it’s not possible with native windows tools or with msys, it is possible to create such directory with cygwin. So you can use cygwin git instead of msys one as workaround.

    The cygwin git has three main disadvantages compared to the msys one: It does not register itself with the system, so you don’t get the context menu in explorer (can be set manually, it’s just an entry in registry), it’s gui and gitk only work when cygwin X server is running and it sets funny access lists to everything as cygwin tries to emulate unix permissions (that can be tunred off in /etc/fstab and I always do that; don’t forget to set core.filemode to false in git than so it does not try to track executable bit). So that’s why I normally use msys git even when running from cygwin, but as that does not work for you, cygwin git should be good enough substitute.

    To avoid cloning one or several directories, you could use git sparse checkout as described here.

    Git Baby is a git and github fan, let's start git clone.