Skip to main content
Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Git Configurations

What are git configs and why set them up?

Below are the basic configurations needed for Git Bash on Windows, commonly referred to as git configs. These steps are an initial setup that only needs to be completed once per machine or VM.

Configure username

  1. With Git Bash open, enter the following command:
      git config --global user.name “FirstName LastName”
    
  2. Replace “FirstName” and “LastName” with your human-readable first and last name.
    User Name

Configure e-mail

  1. With Git Bash open, enter the following command:
      git config --global user.email email@address.com
    
  2. Replace “email@address.com” with your work e-mail address.
    Email Address

Configure an editor on Windows

With a defined username and email associated with signing your commits, you might want to utilize your favorite editor when writing those commit messages. The following instructions are for individuals using Git Bash when interacting with git repositories.

Using Visual Studio Code as your editor

  1. Instal Visual Studio Code.
  2. Open Git Bash.
  3. Enter the following command:
    git config --global core.editor “code --wait”
    Visual Studio Code Editor

Eclipse users

  1. Install Eclipse with EGit: https://www.eclipse.org/egit/download/

Other helpful configs

When you install newer versions of Git Bash on Windows, it will automatically set both of these up for you:

  • Set your credential manager for Windows:
    git config --global credential.helper wincred
  • Windows and Unix operating systems handle line endings differently. You can tell git to automatically fix this issue for you.
    For Windows, you set:
    git config --global core-autocrlf true