Azure DevOps Fundamentals - Day 1
| Activity | Duration | Description |
|---|---|---|
| Installation | 8 minutes | Download and install Git |
| Configuration | 10 minutes | Set up user identity and preferences |
| Practice | 5 minutes | Run commands and verify setup |
Visit: https://git-scm.com/download/win
Download the latest 64-bit version for Windows
Double-click the downloaded .exe file
Accept the license agreement
Click "Install" and wait for completion
Click "Finish" to exit the installer
Open Command Prompt or Git Bash and run:
git --version
Expected output: git version 2.43.0 (or similar)
If you have Homebrew installed:
brew install git
Visit: https://git-scm.com/download/mac
Download and run the .dmg installer
Follow the installation wizard
Git comes bundled with Xcode Command Line Tools:
xcode-select --install
Open Terminal and run:
git --version
Expected output: git version 2.39.0 (or similar)
# Update package index sudo apt update # Install Git sudo apt install git -y
# Fedora 22+ / RHEL 8+ sudo dnf install git -y # Older versions sudo yum install git -y
sudo pacman -S git
git --version
Expected output: git version 2.39.0 (or similar)
Every Git commit uses your configured name and email. This information is permanently baked into the commits you create and is essential for tracking contributions and collaboration.
This is the most important configuration. Your identity will appear in every commit you make.
# Set your name git config --global user.name "Your Full Name" # Set your email (use your company/organizational email) git config --global user.email "your.email@company.com"
Set your preferred text editor for Git operations:
# For Visual Studio Code git config --global core.editor "code --wait" # For Vim git config --global core.editor "vim" # For Nano git config --global core.editor "nano" # For Notepad++ (Windows) git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
Prevent issues when working across different operating systems:
# For Windows git config --global core.autocrlf true # For macOS/Linux git config --global core.autocrlf input
Set the default branch name to 'main' (modern standard):
git config --global init.defaultBranch main
# Enable colored output git config --global color.ui auto # Enable credential caching (saves passwords temporarily) git config --global credential.helper cache # Windows: Use Git Credential Manager git config --global credential.helper manager-core # Set cache timeout to 1 hour (3600 seconds) git config --global credential.helper 'cache --timeout=3600'
# Show short status format git config --global status.short true # Enable auto-correct for mistyped commands git config --global help.autocorrect 20 # Set default pull behavior git config --global pull.rebase false
Copy and run this complete configuration:
# Essential Git Configuration # Replace "Your Name" and email with your actual details git config --global user.name "Your Full Name" git config --global user.email "your.email@company.com" git config --global core.editor "code --wait" git config --global init.defaultBranch main git config --global color.ui auto # Windows-specific (skip on Mac/Linux) git config --global core.autocrlf true git config --global credential.helper manager-core # Mac/Linux-specific (skip on Windows) # git config --global core.autocrlf input # git config --global credential.helper cache
git --version
Expected output: git version 2.43.0 or higher
# View all settings git config --list # View with origin paths git config --list --show-origin
This will show all your Git configurations and where they're stored.
# Check your name git config user.name # Check your email git config user.email # Check default editor git config core.editor # Check default branch git config init.defaultBranch
Your configuration should look similar to this:
user.name=John Doe user.email=john.doe@company.com core.editor=code --wait core.autocrlf=true init.defaultbranch=main color.ui=auto credential.helper=manager-core
| Level | Scope | Command |
|---|---|---|
| --system | All users on the system | git config --system |
| --global | All repositories for current user | git config --global |
| --local | Specific repository only | git config --local |
--global which applies to all your repositories!
Windows:
echo %PATH%C:\Program Files\Git\cmdmacOS/Linux:
which gitecho $PATHLinux/macOS:
# Use sudo for installation sudo apt install git # Check file permissions ls -la ~/.gitconfig
Solutions:
rm ~/.gitconfignano ~/.gitconfiggit config --global --replace-all user.name "New Name"If you see a popup asking to install command line tools:
xcode-select --installWindows:
# Reinstall Git Credential Manager git credential-manager-core configure # Or use Windows Credential Manager git config --global credential.helper manager
Resources:
Mark each item as you complete it. All items should be checked before moving to Day 2!
Once all items are checked, you've successfully completed Day 1!
Next Up: Day 2 - Git Init, Commits, Staging & History