Is Git Configured?
Check if Git is configured on a Mac for a Ruby development environment.
You'll use GitHub or a similar service (GitLab or BitBucket) to develop software. As a solo developer, you'll use Git with a GitHub account for version control and remote backup. As a team member, you'll commit code to a repository, participate in code reviews, merge code and deploy projects using Git and GitHub.
Git is automatically installed with Xcode Command Line Tools. It is essential software for "save-as-you-go" version control of the code you write. Strictly speaking, you don't need Git to create software; however, Git is essential to any professional software project.
Is Git installed?
Git is installed as part of Xcode Command Line Tools. Check that Git is installed:
$ git version
git version 2.39.3 (Apple Git-145)
You should see git version 2.39.0 (or newer).
Download and install Git if necessary
If Git is not installed, see the article Install Git to begin the download and installation process.
You should Create a GitHub account if you don't have one (alternatively, GitLab or BitBucket).
Is Git configured?
Check if Git is configured by listing the current settings with the git config -l --global
command.
$ git config -l --global
user.name=Your Real Name
user.email=me@example.com
If your name and email is not set, go to Git Config to set the Git configuration.
Set GitHub credentials
If you do nothing to configure Git credentials, you must enter a username and password every time you connect to GitHub from the command line. Entering credentials frequently adds friction and annoyance to your workflow.
To avoid entering a username and password every time you connect to GitHub from the command line, you have three options.
- Use the Git Credential Manager (easiest).
- Download and use the GitHub CLI.
- Set up a GitHub SSH key (complicated).
What's next
The Mac Install Guide website contains all the instructions you need to set up your Mac as a development environment.
You can install Ruby directly with Homebrew:
Or install Ruby with a software version manager: