Skip to main content
/2 min read

Git Setup: Your Name & Email

Resolve a Merge Conflict

1

Identify Conflicts

git status shows files with conflicts after a failed merge.

2

Open the Files

Look for <<<<<< / ====== / >>>>>> markers — your changes vs theirs.

3

Edit & Stage

Pick the right code, remove markers, git add the file.

4

Complete the Merge

git commit finalizes the merge with the resolved content.

Build Programming Foundations at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate teaches Git alongside the modern web stack — a must for any developer.

Git allows you to work more easily with other developers. Because you want to know who worked on a file and how to contact them, you need to tell Git your name and email.

Tell Git Your Name & Email

1. To access the command line, do the following instructions for your platform:

  • Mac: Go to Applications > Utilities and open Terminal.app.
  • Windows: If you're already familiar with the Windows Command Prompt and prefer it, launch that app. Otherwise, launch Git Bash, which may be an icon on your Desktop, or in the Windows Start menu (possibly in a Git folder).

2. Enter the following command, replacing Your Name with your actual first and last name (but keep the quotes around it):

Git config—global user.name "Your Name"

3. Enter the following command, replacing you@example.com with your actual email (but keep the quotes around it):

Git config—global user.email "you@example.com"

Keep in mind that changing the name and email will only affect future work.

Checking Your Git Setup (Name & Email)

To check the name or email currently set in Git, you can run the same commands, but without the value in quotes. So you'd use these commands:

Git config—global user.name

Git config—global user.email

Go Beyond Git

Git is an essential tool for collaborating with other programmers. Learn Git and more through our coding classes & bootcamps: