Search the field guide

Search all 29 chapters. Your search stays on this device.

↑ ↓ Move between results Enter Open · Esc Close

Browse chapters

DocsStart hereFIELD NOTES / 02

Start here · 1 min read

Git in five minutes

Preview documentation About this guide ⓘ

GitTrail is in preview: commands and features may change before the first release, and host integrations are still being tested against each live service.

Chapter 2 of 29
On this page

In this chapterUnderstand commits, branches and the edit-to-push workflow.

One project. Room to explore.
mainfeature/cart
1Edit files2Stage changes3Commit4Push5Pull

Git keeps the history of a project. Each time you save a meaningful step, Git stores a snapshot called a commit. Commits link to the one before them, forming a timeline.

  • A repository (repo) is a project folder that Git tracks.
  • A branch is a separate line of work, like feature/cart above, so you can try things without disturbing main.
  • Merging brings a branch’s work back into another branch.
  • Your repo usually also lives on a server (GitHub, GitLab…), called a remote. You push your commits to it and pull other people’s commits from it.

The daily loop looks like this:

Every commit records an author (a name and email). That’s why using the right account matters: the author is permanent, and the remote checks your key or token before accepting a push.

Need another approach?Find a fix →