Skip to content

Instantly share code, notes, and snippets.

@porcelani
Last active February 22, 2017 18:26
Show Gist options
  • Select an option

  • Save porcelani/3a6dc0b09519e0e4b98974b12caa53bf to your computer and use it in GitHub Desktop.

Select an option

Save porcelani/3a6dc0b09519e0e4b98974b12caa53bf to your computer and use it in GitHub Desktop.
git config
List all variables in git:
git config --list
To save the output of a command as variable in bash, use command substitution $():
GIT_NAME="$(git config --global user.name)"
GIT_PASSWORD="$(git config --global user.password)"
GIT_EMAIL="$(git config --global user.email)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment