Back to roadmaps git Course

Configuring Git: Installation and Global User Settings

Let us install and configure the Git global environment.


1. Initial User Identification Configuration

Every Git commit is stamped with the author name and email. Set these credentials globally inside your terminal console:

# Set user name
git config --global user.name "Your Name"

# Set user email
git config --global user.email "your.email@example.com"

2. Line Ending Normalization (core.autocrlf)

Windows uses Carriage Return + Line Feed (CRLF) to mark line endings, while Unix/Linux/macOS systems use Line Feed (LF) only. This difference can lead to false modifications when collaborating across platforms.

Configure Git to normalize line endings automatically:

  • Windows Developers: Convert LF to CRLF when checking out code, and convert CRLF back to LF when committing:
git config --global core.autocrlf true
  • macOS / Linux Developers: Keep LF on checkout, and convert CRLF to LF on commit:
git config --global core.autocrlf input

3. Verifying Configurations

Review all active system configurations:

# List all active config parameters
git config --list
Published on Last updated: