Skip to content

Instantly share code, notes, and snippets.

@acidtone
Last active September 8, 2023 15:40
Show Gist options
  • Save acidtone/6ca4c62d88570732d3760904ef965e4d to your computer and use it in GitHub Desktop.
Save acidtone/6ca4c62d88570732d3760904ef965e4d to your computer and use it in GitHub Desktop.
Git Activity: First-time setup

Git: First-time setup

Prerequisites

Setting your identity

Setting your name and email is required for some Git and GitHub features to operate properly. It's also good practice even if you work alone on your laptop.

username setting

  1. Is your username already set up? The following shell command will print your settings for your username:

    $ git config user.name

    If nothing happens, you need to set your username.

  2. To set your username globally:

    $ git config --global user.name "Jenn Simmons"
  3. Repeat Step 1 to confirm your settings were saved correctly.


email setting

  1. Is your email already set up? The following shell command will print your settings for your email:

    $ git config user.email
    

    If nothing happens, you need to set your username.

  2. To set your email globally:

    $ git config --global user.email jenn@example.com
    
  3. Repeat Step 1 to confirm your settings were saved correctly.

Related things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment