0

I am performing below operation

github_nam="Aviral Vishnoi"
git config --global user.name $github_nam

It is saving it as user.name=Aviral

I want it to store my full name as user.name=Aviral Vishnoi

I have tried single quote, double quotes and escape \ character without success.

fpmurphy
  • 4,636

1 Answers1

1

This worked for me:

Set the var

github_nam="Aviral Vishnoi"

Then set the git config

git config --global user.name "$github_nam"

Note the quotes around $github_nam.

See the question "When is double-quoting necessary?" for why the quotes matter.

Devon
  • 847