Git Bash commands in VS-Code: git init fatal: unable to access 'C:\Users?ikeh/.config/git/config': Invalid argument #22073

Closed
opened 2026-01-31 08:02:42 +00:00 by claunia · 2 comments
Owner

Originally created by @EikeHanel on GitHub (Aug 9, 2024).

While using Visual Studio Code: Version: 1.92.1 (user setup) and then the Git Bash Terminal, every Git command leads to:
$ git init
fatal: unable to access 'C:\Users?ikeh/.config/git/config': Invalid argument
(.venv)

When using PyCharm or the Windows Command Center the response is what you would expect.

I am still learning about Git and how to use it properly, so i would appreciate some help.

Kind regards,
Eike

Originally created by @EikeHanel on GitHub (Aug 9, 2024). While using Visual Studio Code: Version: 1.92.1 (user setup) and then the Git Bash Terminal, every Git command leads to: $ git init fatal: unable to access 'C:\Users?ikeh/.config/git/config': Invalid argument (.venv) When using PyCharm or the Windows Command Center the response is what you would expect. I am still learning about Git and how to use it properly, so i would appreciate some help. Kind regards, Eike
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 08:02:42 +00:00
Author
Owner

@lhecker commented on GitHub (Aug 9, 2024):

Your HOME environment variable in git bash is probably incorrect. If you don't really want to use Git Bash, you can also just use powershell or even cmd. Git works in any shell.

@lhecker commented on GitHub (Aug 9, 2024): Your `HOME` environment variable in git bash is probably incorrect. If you don't really want to use Git Bash, you can also just use powershell or even cmd. Git works in any shell.
Author
Owner

@EikeHanel commented on GitHub (Aug 9, 2024):

Thank you very much!
I found this regarding your post and it fixed the problem:
https://graphite.dev/guides/git-change-home-directory-git-bash

I am doing an online tutorial and they used Vs-Code and I was just confused why every other terminal worked but the one in Vs-Code didn't.

Anyway, this solves my problem I'll close this thread.

@EikeHanel commented on GitHub (Aug 9, 2024): Thank you very much! I found this regarding your post and it fixed the problem: https://graphite.dev/guides/git-change-home-directory-git-bash I am doing an online tutorial and they used Vs-Code and I was just confused why every other terminal worked but the one in Vs-Code didn't. Anyway, this solves my problem I'll close this thread.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22073