read the transcript!
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
mainbranch has to stay more less in sync with
But there are no rules.
git character with demon hat: want to do something horrible to your branch? no problem!
there are literally no rules
commands that you can use to do weird stuff to a branch:
instead of rules, we have conventions
git pulloften to keep your
mainup to date
- if you’re working with a big team, don’t commit to
Illustration of the git demon talking to a nonplussed stick figure with curly hair.
git demon: you’ve just gotta be really careful to not do the wrong thing and not mess up your branch
person: um… thanks?
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.
This is a page from a zine on git I'm currently writing. To get an email when the zine comes out, sign up for our announcements list: