Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git config commands need double quotes instead of single quotes #221

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

daattali
Copy link
Contributor

You might want to test this on other devices/OSs, and if this doesn't work across the board then there should be a note that different quotes are needed based on your OS.

I'm on a freshly reformatted Windows 10 Pro, using the classic Windows Command Prompt, and I noticed that when using single quotes, the value gets cut off at whitespace:

C:\Users\Dean>git config --global user.name 'Jane Doe'

C:\Users\Dean>git config --global --list
user.name='Jane

C:\Users\Dean>git config --global --unset-all user.name

C:\Users\Dean>git config --global user.name "Jane Doe"

C:\Users\Dean>git config --global --list
user.name=Jane Doe

You might want to test this on other devices/OSs, and if this doesn't work across the board then there should be a note that different quotes are needed based on your OS.

I'm on a freshly reformatted Windows 10 Pro, using the classic Windows Command Prompt, and I noticed that when using single quotes, the value gets cut off at whitespace:

```cmd
C:\Users\Dean>git config --global user.name 'Jane Doe'

C:\Users\Dean>git config --global --list
user.name='Jane

C:\Users\Dean>git config --global --unset-all user.name

C:\Users\Dean>git config --global user.name "Jane Doe"

C:\Users\Dean>git config --global --list
user.name=Jane Doe
```
@jennybc
Copy link
Owner

jennybc commented Sep 26, 2023

Interesting! Double is fine with me, thanks.

@jennybc jennybc merged commit a28be6d into jennybc:main Sep 26, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants