Install Git
Git is a distributed version control system that allows you to track changes in files and coordinate work among multiple people on a project. It is an essential tool for modern software development and will be used extensively during the bootcamp.
Git Installation
Windows
Option 1: Git for Windows (Recommended)
- Download: Go to git-scm.com/downloads/win to download the Git for Windows installer.
- Installation: Run the installer and follow the on-screen instructions.
- Keep the default options unless you have specific preferences.
- Make sure to select "Git Bash" during installation, as it provides a Unix-like terminal for Windows.
Option 2: Using Chocolatey
If you already have Chocolatey installed, you can install Git with the following command in PowerShell (as administrator):
choco install git -y
macOS
Option 1: Homebrew (Recommended)
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install Git:
brew install git
Option 2: Official Installer
- Download: Go to git-scm.com/download/mac to download the installer.
- Installation: Run the installer and follow the on-screen instructions.
Ubuntu/Debian
sudo apt update
sudo apt install git
Verify the Installation
After installation, verify that Git was installed correctly:
git --version
You should see something like git version 2.x.x.
Initial Git Configuration
After installing Git, it's important to configure it with your personal information:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Configure Text Editor (Optional)
You can configure the text editor that Git will use for commit messages:
# For VS Code
git config --global core.editor "code --wait"
# For Vim
git config --global core.editor "vim"
# For Notepad++ (Windows)
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
Configure Default Branch
Git now uses main as the default name for the main branch. To configure this:
git config --global init.defaultBranch main