Git & GitHub Without the Fear: A Practical Starter
Commits, branches and pull requests explained in plain words, with the handful of commands you will use every day.
1 min read
Git has a reputation for being confusing, but day to day you only need a small set of ideas and commands. This guide covers exactly those, nothing more.
Git and GitHub are not the same thing
Git is a tool that runs on your computer and remembers every version of your project. GitHub is a website that stores a copy of that history online, so you can back it up, share it and work on it with other people.
The three ideas that matter
- Commit: a saved snapshot of your project, with a short message describing what changed.
- Branch: a separate line of work, so you can try something without touching the main version.
- Pull request: a proposal on GitHub to merge one branch into another, with space for review.
The everyday commands
git status # what changed?
git add . # stage every change
git commit -m "Add footer" # save a snapshot
git switch -c new-header # create and move to a new branch
git push -u origin new-headerThat is genuinely most of what you will type in a normal week.
A simple workflow
- Create a branch for every feature or fix.
- Commit early and often, with clear messages.
- Push the branch and open a pull request.
- Review, merge, and delete the branch.
When things go wrong
Made a mess you have not committed yet? git restore . throws away your local changes. Committed something by mistake? git revert creates a new commit that undoes it, without rewriting history. Both are safe, and knowing they exist takes most of the fear away.