{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/4651","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/4651/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/4651/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/4651/events","html_url":"https://github.com/Microsoft/vscode/issues/4651","id":143290321,"number":4651,"title":"[FYI] Using git on msys2 ","user":{"login":"mattn","id":10111,"avatar_url":"https://avatars.githubusercontent.com/u/10111?v=3","gravatar_id":"","url":"https://api.github.com/users/mattn","html_url":"https://github.com/mattn","followers_url":"https://api.github.com/users/mattn/followers","following_url":"https://api.github.com/users/mattn/following{/other_user}","gists_url":"https://api.github.com/users/mattn/gists{/gist_id}","starred_url":"https://api.github.com/users/mattn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattn/subscriptions","organizations_url":"https://api.github.com/users/mattn/orgs","repos_url":"https://api.github.com/users/mattn/repos","events_url":"https://api.github.com/users/mattn/events{/privacy}","received_events_url":"https://api.github.com/users/mattn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-24T16:15:45Z","updated_at":"2016-03-27T02:53:47Z","closed_at":"2016-03-27T02:53:47Z","body":"As I filed issue ago, vscode can't work with msys2's git. Because git provided on msys2 return `/c/` prefixed-path for rev-parse command.\r\n\r\nhttps://github.com/Microsoft/vscode/issues/387\r\n\r\nIf you really want to use msys2's git, try following.\r\n\r\n1. Write git-wrap.bat for git.exe\r\n\r\n    ```batch\r\n    @echo off\r\n    setlocal\r\n    \r\n    rem If you don't add path for msys2 into %PATH%, enable following line.\r\n    rem set PATH=c:\\msys64\\usr\\bin;%PATH%\r\n    \r\n    if \"%1\" equ \"rev-parse\" goto rev_parse\r\n    git %*\r\n    goto :eof\r\n    :rev_parse\r\n    for /f %%1 in ('git %*') do cygpath -w %%1\r\n    ```\r\n   Put this git-wrap.bat into somewhere.\r\n\r\n2. Set `git.path` for git-wrap.bat\r\n  open `File` -> `Preferences` -> `User Settings`, And add `git.path` pointed `git-wrap.bat` on your configuration file like below.\r\n\r\n    ```\r\n    \"git.path\": \"c:/users/mattn/bin/git-wrap.bat\",\r\n    ```\r\n\r\n3. Restart vscode\r\n\r\nHave fun!\r\n"}}