Launch School introduces Git and GitHub as core tools for modern development workflows, helping you track changes and collaborate effectively. This guide walks through the fundamentals so you can start managing code history and sharing projects with confidence.
Whether you are new to version control or brushing up on GitHub workflows, the following sections organize key ideas into focused, scannable sections. You can follow this path step by step and build reliable habits early.
| Topic | Key Command | Purpose | Typical Outcome |
|---|---|---|---|
| Initialize repository | git init | Start version control in a project folder | Creates a hidden .git directory |
| Stage changes | git add | Select files for the next commit | Updates the staging area |
| Record snapshot | git commit | Save a permanent point in history | Generates a commit with message and hash |
| Share online | git remote add && git push | Link local repo to GitHub and publish | Branches appear in your GitHub account |
| Collaborate safely | git pull && git push | Sync with team and resolve conflicts earlyKeeps everyone up to date with shared history |
Getting Started with Git Basics
Launch School emphasizes practical clarity when introducing version control concepts. You begin by understanding what Git tracks, why it matters, and how it differs from simple file backups.
Setting up Git on your machine involves configuring your name and email, which ties each change back to you. This personal identity becomes part of every commit you make in your learning journey.
Creating and Cloning Repositories
Local repository creation
Creating a repository on your computer sets up a .git folder that records every change. Launch School guides you through this step so you see exactly where history lives.
Cloning from GitHub
Cloning pulls a full copy of an online repo to your machine, including branches and commit history. This lets you start working immediately on projects shared by instructors or teams.
Staging, Committing, and Reviewing Changes
Adding specific files
Using git add with selective files keeps each commit focused. Launch School teaches you to stage logical units of work instead of dumping everything at once.
Writing meaningful commit messages
Clear commit messages explain why a change happened, not just what changed. You practice concise descriptions that help you and teammates understand the history later.
Reviewing history with log and diff
Commands like git log and git diff show how your project evolved. Launch School builds comfort with these inspections so you can trace bugs and reasoning steps accurately.
Branching, Merging, and Collaboration Workflows
Working with branches
Branches let you experiment without disturbing main work. Launch School introduces branches early so you can safely refactor and learn isolated workflows.
Merging and resolving conflicts
Merging combines branches, while conflicts appear when the same lines change differently. You practice resolving these calmly with step-by-step methods taught in the curriculum.
Connecting Locally to GitHub
Linking your local repo to a GitHub remote involves adding a remote URL and pushing commits. Launch School explains each flag and response so you are not lost when errors occur.
Understanding pull requests and code reviews is part of collaborating professionally. You learn to present changes clearly, respond to feedback, and update branches before merging.
Practicing Reliable Version Control Habits
- Commit small, logical units of work with descriptive messages.
- Pull before pushing to stay synchronized with shared branches.
- Use branches for experiments and features instead of the main line.
- Review git status and git log regularly to understand project state.
- Resolve merge conflicts patiently by verifying each change context.
FAQ
Reader questions
How do I verify my Git identity after configuration?
Run git config --list and check the user.name and user.email values to confirm your identity settings are applied.
What should I do if a git push is rejected because of non-fast-forward changes?
First run git pull to integrate remote changes, resolve any conflicts, then push your updated branch again.
How can I review the differences between two commits?
Use git diff followed by the two commit hashes to see exactly what lines changed between those snapshots.
What is a safe way to undo the last commit without losing my changes?
Run git reset --soft HEAD~1 to move the branch pointer back while keeping your staged changes intact.