How to set up your username in Git if it contains

2019-06-25 06:17发布

问题:

Hey there. I'm using Git for windows (The msysgit project). And working with the GIT Bash. I'm also pushing my programmed stuff to gitHub. The problem is that my gitHub's user name contains a "č" character and the GIT Bash won't let me type that in. Is there a way of setting my --global user.name within my GIT settings to contain that "č" character?

Thanks.

回答1:

git config --edit will open your gitconfig [1] in an editor, you can set it by hand there.

[1] you can also specify these flags to edit the other gitconfigs available, quoted from git-config(1):

--system, --global or --file which specify where the values will be read from or written to. The default is to assume the config file of the current repository, .git/config unless defined otherwise with GIT_DIR and GIT_CONFIG



回答2:

You can edit the C:\*username*\.gitconfig file in your text editor