DEV Community

Jim Zandueta
Jim Zandueta

Posted on • Edited on

How to setup your global (and local) git profile?

Required Reading:

  • None

Optional Reading:

  • None

-

Setup your git profile

  • Open your favorite terminal
  • Set your git username
$ git config --global user.name "Tony Stark"
Enter fullscreen mode Exit fullscreen mode
  • Set your git email
$ git config --global user.email tonystark@avengers.com
Enter fullscreen mode Exit fullscreen mode
  • Set your git editor *optional
$ git config --global core.editor nano 
# you can also use emacs (nostalgic) or vim (adventurous). 
# Vim is the default editor.
Enter fullscreen mode Exit fullscreen mode
  • Review your settings
$ git config --list --show-origin
Enter fullscreen mode Exit fullscreen mode

The global flag --global will apply the configuration to the current operating system profile/user. If you want to apply your configuration at the local level, navigate to the project's root directory (where the.git folder is located) and run the git config commands without the global flag, or use the local flag --local to be more verbose.

-

Resources

Top comments (0)