Git module
Getting started
Your Git practice environment
Install Git, set your local identity, and create the ~/dcubes/git-lab folder.
beginner30 minRun on your machine
What you will be able to do
- Install git so git --version works
- Set user.name and user.email for this machine
- Create ~/dcubes/git-lab for later lessons
Why this exists
Data work is files under version control: Python jobs, SQL, Compose. Git snapshots those files. This site never runs Git for you.
Do Linux Getting Started first so you have a terminal and ~/dcubes.
Install Git
Linux / WSL (Ubuntu)
sudo apt update
sudo apt install --yes git
git --version
macOS
xcode-select --install
Or:
brew install git
git --version
Identity (local)
Git stamps every commit with a name and email. Use values you are comfortable sharing on public remotes later.
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
git config --global --list | grep -E 'user\.|init\.defaultBranch'
Replace the placeholders with your name and email.
Lab folder
mkdir -p ~/dcubes/git-lab
cd ~/dcubes/git-lab
pwd
Ready checklist
git --version
git config --global user.name
git config --global user.email
All three should print values (not empty).
Common mistakes
- Committing as root accidentally — stay in your user account.
- Typos in email — fix with the same
git config --globalcommands. - Skipping defaultBranch — older Git defaults to
master; we usemain.