Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DEV Community

Cover image for Commit to Code: Setting Up Git and GitHub
Shane Dsouza
Shane Dsouza

Posted on • Edited on

Commit to Code: Setting Up Git and GitHub

Git & GitHub Series

➡️ You're reading Part 2

⬅️ Part 1: Why Git & GitHub Matter


Installation and Setup

In this part of the series, we’ll walk through installing Git on your system, setting up your identity, and creating a GitHub account, everything you need to start tracking and sharing your code.


1. Installing Git

Windows

Git installation wizard on Windows

  1. Go to git-scm.com and download the Windows installer.
  2. Run the installer and click Next through the setup wizard (default settings are fine).
  3. Choose Git Bash as your default terminal.
  4. Finish the installation and verify Git was installed:
git --version
Enter fullscreen mode Exit fullscreen mode

macOS

Option 1 – Install via Xcode CLI:

xcode-select --install
Enter fullscreen mode Exit fullscreen mode

Option 2 – Using Homebrew:

brew install git
Enter fullscreen mode Exit fullscreen mode

Verify installation:

git --version
Enter fullscreen mode Exit fullscreen mode

2. Configuring Git with Your Identity

Once Git is installed, you should set your username and email. This information will be attached to your commits.

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Enter fullscreen mode Exit fullscreen mode

To verify your settings:

git config --list
Enter fullscreen mode Exit fullscreen mode

This ensures that every commit you make is properly attributed to you, which is especially important when collaborating.


3. Creating a GitHub Account

If you don’t already have a GitHub account:

Github Signup Page

  1. Visit https://github.com/join
  2. Choose a username, enter your email address, and create a password
  3. Follow the prompts to verify your email and complete your profile Once you’re signed in, you’ll be ready to start creating repositories and pushing code to GitHub.

You're All Set!
You now have:

  • Git installed
  • Your identity configured
  • A GitHub account ready to go

📚 More from the Series


Enjoyed this?

Let me know in the comments or follow me for the next post in this Git & GitHub series!

shanedsouza.com

Top comments (0)