basforge

Search titles, text and the “If it doesn’t work” cases.

    RU
    Topic · Development

    Git

    History, branches, undo, keys and accounts

    Entries
    13 + 2
    Cases
    33
    Updated
    2026-10-19
    Series · where to startOverview

    Git: what it is and how it stores history

    Git stores a directory’s history as snapshots: every commit is the full state of the files, a link to the previous one, and a note on who and why. A branch is a name pointing at a commit, so branches cost nothing, and almost any action can be undone. A copy on GitHub is the same history, not a separate program.

    Read the overview
    1. From scratch · ManualGit from scratch: the first repository and a push to GitHub over SSHInstall git, create a repository, make the first commit and push to GitHub with an SSH key.
    2. .gitconfig · Config~/.gitconfig block by block: what to set onceSettings worth setting once: a main branch, pull without surprises, readable conflicts.
    3. Cheat sheet · Cheat sheetEveryday git: status, commits, branches, syncingEveryday commands: status, history, commits, branches, syncing.
    4. Branches · ManualBranches in git: merge, rebase and conflicts step by stepMerge, rebase and conflicts: which to choose and how to resolve a conflict step by step.
    5. Undo · Cheat sheetUndo in git: what happened — which commandWhat happened — which command: from an edit in a file to a deleted branch.
    6. Find the break · ManualFind where it broke: log, blame and bisectlog, blame and bisect: which commit broke it and why it was made.
    7. Keys and accounts · ManualGit and SSH keys: deploy keys, two accounts, signed commitsDeploy keys, two GitHub accounts on one computer, signing commits with an SSH key.
    8. Git on the server · Manualfrom Server changesServer configs in git: /opt as the repositoryServer configs in git: /opt as a repository, an allowlist and secrets kept out of history.

    Tips

    5

    Also on this topic

    Entries from other topics that are about this too.