Tell Git Your Name & Email
Before you can start tracking changes and collaborating on projects, Git needs to know who you are. This identity information gets embedded in every commit you make, creating a permanent record of your contributions. Here's how to configure your credentials across different platforms:
- Mac: Navigate to Applications > Utilities and launch Terminal.app. You can also press Cmd + Space and search for "Terminal" for quicker access.
- Windows: If you're comfortable with the traditional Windows Command Prompt, you can use that. However, we recommend launching Git Bash, which provides a more Unix-like environment and better Git integration. Look for it on your Desktop or in the Windows Start menu (often located within a Git folder).
2. Configure your name by entering the following command, replacing Your Name with your actual first and last name (maintain the quotes to handle names with spaces):
git config --global user.name "Your Name"
3. Set your email address with this command, replacing you@example.com with your actual email address (keep the quotes for consistency):
git config --global user.email "you@example.com"
Important note: These configuration changes only affect future commits. Any existing commits will retain their original author information, which helps maintain the integrity of your project's history.
Git Configuration Process
Launch Command Line Interface
Open Terminal on Mac or Git Bash/Command Prompt on Windows to access the command line environment where Git commands are executed.
Set Global Username
Execute the git config --global user.name command with your actual name in quotes to establish your identity for all Git repositories on your system.
Configure Email Address
Run the git config --global user.email command with your email address in quotes to link your commits to your email identity.
Remember that name and email changes only affect future commits and work. Previously committed work will retain the old configuration settings.
git config --global user.name "Your Name"Checking Your Git Setup (Name & Email)
Once you've configured Git, it's good practice to verify your settings are correct. You can retrieve your current configuration by running the same commands without specifying new values:
git config --global user.name
git config --global user.email
These commands will display your currently configured name and email, allowing you to confirm everything is set up properly before you start committing code. If you need to work on different projects with different identities, you can also set repository-specific configurations by omitting the --global flag when inside a specific project directory.
Setting vs Checking Commands
| Feature | Setting Configuration | Checking Configuration |
|---|---|---|
| Username Command | git config --global user.name "Your Name" | git config --global user.name |
| Email Command | git config --global user.email "you@example.com" | git config --global user.email |
| Purpose | Sets new value | Displays current value |
Configuration Verification Steps
Verify that your full name displays correctly as it will appear in commit history
Confirm your email address matches the one you use for your Git hosting service
Create a test repository to ensure your identity appears correctly in commit logs
Go Beyond Git
Mastering Git is just the beginning of your development journey. As version control becomes second nature, you'll want to expand your technical skills to stay competitive in today's evolving tech landscape. Our comprehensive training programs combine Git proficiency with in-demand programming skills:
Available Learning Paths
Web Development Classes
Comprehensive courses covering modern web development technologies and practices. Located in NYC with hands-on project experience.
Python Programming Classes
Learn Python fundamentals and advanced concepts through structured bootcamps. Perfect for beginners and experienced developers expanding their skillset.
Data Science Training
Master data analysis, machine learning, and statistical methods through practical projects. Industry-focused curriculum with real-world applications.
Web Design Courses
Develop skills in user interface design, user experience principles, and modern design tools. Create portfolio-worthy projects during the program.
Proper Git configuration is your first step toward effective collaboration with other developers. With your identity configured, you're ready to contribute to team projects and open source repositories.