Installing Git

Get Git installed and ready for your first commit.

Step 1 – Install Git#

macOS

brew install git

Linux

# Debian / Ubuntu
sudo apt update && sudo apt install git

# Fedora / RHEL
sudo dnf install git

# Arch
sudo pacman -S git

Windows
Download the installer from git-scm.com. We recommend using Git Bash for all subsequent commands.

Step 2 – Configure Your Identity#

Git requires a name and email to attribute your work. Run these commands in your terminal:

git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"

Step 3 – Your First Commit#

Verify your setup by creating a local repository and making a “Hello World” commit:

mkdir hello-opencommit && cd hello-opencommit
git init
echo "# Hello OpenCommit" > README.md
git add README.md
git commit -m "Initial commit"

✅ Done#

Now you can Connect via SSH to push your code to OpenCommit.