If you want to work in tech, learning Git and GitHub is one of the most useful skills you can pick up early. Almost every software team uses Git to track changes, and GitHub is where many developers store code, collaborate and show their work to employers. The good news is that you do not need to master everything at once. This beginner’s roadmap shows how to learn Git and GitHub step by step, which commands matter first, and how to practise until it feels natural.
Git vs GitHub: what is the difference?
Git is a free, open-source version control tool that runs on your computer. It records snapshots of your project so you can see what changed, undo mistakes and work on new features without breaking the main version.
GitHub is an online platform that hosts Git repositories. It adds collaboration tools such as pull requests, code review, issues and project boards. Alternatives like GitLab and Bitbucket work in similar ways, so the skills transfer.
Step 1: Install Git and learn the basics of the terminal
Install Git on your computer and get comfortable with a few terminal commands, like moving between folders and listing files. Many beginners feel nervous about the command line, but you only need a handful of commands to start. Configure your name and email so your commits are labelled correctly.
Step 2: Learn the core Git workflow
The everyday Git cycle is simple: change files, stage them, and commit them with a message. Learn these commands first.
| Command | What it does |
|---|---|
| git init | Creates a new repository in a folder |
| git status | Shows what has changed and what is staged |
| git add | Stages changes for the next commit |
| git commit -m | Saves a snapshot with a message |
| git log | Shows the history of commits |
| git diff | Shows exactly what changed in files |
Practise writing short, clear commit messages that describe why you made a change, such as fix login button alignment. Good messages are a habit employers notice.
Step 3: Understand branches and merging
Branches let you work on a feature or fix separately from the main code. Once it works, you merge it back. Learn to create a branch, switch between branches and merge them. Then deliberately create a merge conflict in a practice project and resolve it. Conflicts are normal, and handling them calmly is a key skill.
Step 4: Connect to GitHub
Create a GitHub account, then learn to push a local repository to GitHub and clone an existing one. Key commands at this stage are git clone, git push, git pull and git remote. Set up authentication using the method GitHub currently recommends, such as SSH keys or a credential manager.
Step 5: Learn pull requests and code review
Pull requests are how teams propose, discuss and approve changes. Practise opening a pull request from a branch, reviewing the changes, leaving comments and merging. Try contributing to a beginner-friendly open-source project; many label simple tasks as good first issue.
Step 6: Build habits that help in real jobs
- Write a clear README for each project explaining what it does and how to run it
- Use a .gitignore file so you do not commit secrets, passwords or large build files
- Commit small, focused changes often instead of one huge commit
- Learn to undo safely with git restore, git revert and, carefully, git reset
- Explore GitHub Actions for simple automated checks once you are comfortable
Automation with GitHub Actions is a gateway to DevOps. If that interests you, our DevOps beginner’s roadmap is a natural next step.
A realistic study plan
Most beginners can learn the essentials in a few weeks of regular practice. A simple plan might look like this:
- Week 1: install Git, learn the terminal basics and the add, commit and log cycle
- Week 2: branches, merging and resolving conflicts
- Week 3: GitHub, remotes, pushing, pulling and pull requests
- Week 4 and beyond: use Git on every project you build and contribute to open source
The fastest way to learn is to use Git on real projects. If you are learning to code at the same time, track your exercises from our JavaScript roadmap in a GitHub repository from day one.
Using AI tools while learning Git
AI coding assistants can explain error messages, suggest commands and summarize what a commit changed. They are helpful, but always understand a command before running it, especially anything that rewrites history or deletes work. For a broader look at using AI tools responsibly at work, the guides at AIZ Solutions on practical AI tools are a useful companion.
How Git and GitHub help your career
A tidy GitHub profile with a few well-documented projects acts as a portfolio. Recruiters and hiring managers may look at it to see how you write code and communicate. If you are aiming for a first developer role, combine Git skills with a project portfolio as described in our guide to becoming a web developer in Canada without a degree.
FAQ
How long does it take to learn Git?
The basics can be learned in a few weeks of practice. Advanced topics such as rebasing and complex workflows come with experience on real projects.
Should I learn Git or GitHub first?
Start with Git on your own computer, then move to GitHub. Understanding Git first makes GitHub’s features much easier to follow.
Is GitHub free?
GitHub offers a free plan that is enough for learning and personal projects. Paid plans add features for teams and organizations.
Do I need to know Git for a tech job?
For most development, data and DevOps roles, yes. Version control is considered a basic workplace skill.
