“git unable to read current working directory no error” – posh git (windows 10)

I receive this error: Unable to read current working directory: No error when I execute any git command in any directory.

To use git on powershell I installed github for windows (the GUI version) editing the powershell profile file as described here: https://git-scm.com/book/it/v2/Git-in-Other-Environments-Git-in-Powershell

  • How to use Sonar SCM support with a workspace root that is not a Git repository
  • Jenkins Extended E-mail won't print $GIT_BRANCH or $GIT_COMMIT
  • How can a pre-commit git hook runs rspec tests and prevent a commit?
  • Why `git config -f`command doesn't work with a file of network folder for me?
  • Github Merge Fail due to unmerged files
  • Merge part of a pull request
  • . (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
    . $env:github_posh_git\profile.example.ps1

    This happened when yesterday I updated github desktop (I’ve it now at version:

    What can I do?


    Obviously I wasn’t working in a non-existing directory. I tried to delete and re create directories but it doesn’t work. Git doesn’t work everywhere, also if I create a dir and execute git init in it, it won’t work.

  • git assume unchanged vs skip worktree - ignoring a symbolic link
  • Why is the git push syntax for creating a new remote branch from a detached HEAD so different?
  • Does each Visual Studio version need its own cloned git repository?
  • Push different branch to Heroku
  • aborting a git merge and going back to uncommitted work
  • Can I use git rebase with Xcode?
  • 4 Solutions collect form web for ““git unable to read current working directory no error” – posh git (windows 10)”

    I have this same issue with Windows 7, and discovered a really easy solution to it. Instead of typing:

    cd ~/My Documents

    type instead:

    cd ~/Documents

    The ~/My Documents is a symbolic link to ~/Documents that is created automatically upon account creation, but Git has trouble with it.

    An easy way to determine if Git is working correctly in your current directory is to look for the branch name in the bash prompt, like so:

    ~/Documents/someFolder (master)

    If you don’t see the branch name, then Git is not seeing it.

    Maybe your current working directory was removed or has changed to a nonexisting path?

    Use pwd to check your current directory, if it doesnt exist set git to use another directory:

    git --git-dir=/mycode/.git --work-tree=/mycode status

    or create the directory yourself.

    I reported this as issue in the posh-git repo on github: https://github.com/dahlbyk/posh-git/issues/236

    And in another project where someone was having my same problem: https://github.com/git-for-windows/git/issues/473

    In my opinion, Windows 10 screwed up something (symlinks?) updating itself and in order to make it works (as you can read from the second link of the issue) to refer to my documents folder (where I keep all my github repos) I don’t write anymore cd documenti (the italian folder name) but cd documents and it just works.

    This is the issue with permission on actual or intermediate folders.


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