Git
History, branches, undo, keys and accounts
History, branches, undo, keys and accounts
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 overviewmain branch, pull without surprises, readable conflicts.log, blame and bisect: which commit broke it and why it was made./opt as a repository, an allowlist and secrets kept out of history..gitignore hides only new files.Set line endings in .gitattributes, not core.autocrlfGit for Windows turns LF into CRLF on checkout by default, and a script built on Windows and copied to a server fails: /bin/bash^M: bad interpreter.Before running an AI agent — a clean git statusAn agent edits many files at once.push --force-with-lease instead of --forceAfter a rebase or --amend of a pushed branch you need a forced push.Entries from other topics that are about this too.