openskills.info
Git Fundamentals logoOpen Course

Git Fundamentals

Git is a distributed version control system that tracks changes to source code across branches, enabling multiple developers to work concurrently and merge their history. It stores snapshots of a project's files, provides cheap branching, and operates fully offline.

itDevOps and software delivery

Don't Panic — Git Fundamentals

Git is a distributed version control system. That means a clone is not a polite request to borrow some files from a server. It is a local copy of a project's reachable history, plus the names that make the history navigable. The server is useful, certainly. It is also not a small glowing orb containing the only copy of reality.

The useful picture has four places. The working tree is the file set you edit. The index, also called the staging area, is the exact content proposed for the next commit. HEAD is the commit currently checked out. Remote-tracking references, such as origin/main, are your local record of what a remote said when you last fetched. Most Git confusion is two of these places wearing the same hat.

A commit records a snapshot and its parent relationship. A branch is a movable name for a commit, not a spare directory that wandered off to start its own life. git add copies selected file content to the index. git commit records that proposed snapshot locally and advances the current branch. That sequence is why a commit is not a cloud upload, despite its surprisingly confident posture.

When histories meet, choose the promise you need. Merge combines histories and can preserve both parents. Rebase reapplies commits on a new base, creating replacement commits with new identities. That can make private work easier to read. It becomes a coordination problem when other people already depend on the old identities. Conflicts are Git declining to invent intent, which is irritating but considerably less irritating than it doing so.

Remotes remain a separate decision. Fetch updates remote-tracking references without integrating them. Pull fetches and then integrates. Push asks a remote to move a reference. A rejected push is a signal to inspect what the remote knows, not an invitation to make the error message disappear.

Read the Intro for the full state model and recovery boundaries. Use Slides when you need the relationships at a glance, Cheatsheet for command-to-layer mappings, and the practice session to make the graph, index, and branch names visible in a disposable repository. The quiz checks whether the words have stopped pretending to be interchangeable.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources