panel 1: you might expect git to enforce some rules about branches some rules you might imagine: * you can't remove commits from a branch, only add them * the `main` branch has to stay more less in sync with `origin/main` But there are no rules. git character with demon hat: "want to do something horrible to your branch? no problem! " panel 2: there are literally no rules commands that you can use to do weird stuff to a branch: * git reset * git rebase panel 3: instead of rules, we have conventions for example: * run `git pull` often to keep your `main` up to date * if you're working with a big team, don't commit to `main` directly git demon: "you've just gotta be really careful to not do the wrong thing and not mess up your branch" person with curly hair: "um... thanks?" panel 4: our only saviour: the reflog git reflog BRANCHNAME will show you the history of every change to the branch, so you can always undo the reflog is a VERY unfriendly UI, but it's always there.
https://cdn.masto.host/socialjvnsca/media_attachments/files/111/567/963/889/958/233/original/6c8f6bf71c17ab3b.png