Skip to main content

Local Git for Git and GitHubs

Local Git is working with a repository on your own machine. You turn a folder into a repository with git init, stage changes with git add, record them as commits with git commit, and read the history with git log and git diff. Each commit is a snapshot with a unique hash.

Stage: Git Basics · Part of the Git and GitHub roadmap · Last reviewed 19 November 2026

What to learn in Local Git

Local Git interview questions

What is the staging area in Git?

The staging area, or index, holds the changes you have chosen to include in the next commit. It sits between your working directory and the repository, so you can commit related changes together instead of everything you modified.

What is a commit hash?

A commit hash is a SHA identifier computed from the commit's contents, author, message and parent. It uniquely names that snapshot, and because it depends on the history, changing an earlier commit changes every later hash.

Where Local Git fits in the Git and GitHub roadmap

Local Git belongs to the Git Basics stage (beginner level), which takes about 9 hours. Save and inspect history.

Back to the full Git and GitHub roadmap