working on a draft of a git cheat sheet, what's missing?

most interested in relatively "basic" things in git that you always forget how to do. Right now I think the push/pull section is by far the weakest

@b0rk the caret notation for parent of a commit (very useful for interactive rebase or when you want to be explicit about what you are diffing)

@robryk @b0rk Now if I could just figure out a way to remember if the caret goes before or after the name...

Follow

@mark @b0rk

Potential mnemonic: x^N is the N-th parent of x (not N-th recursively, but N-th from the list of parents, 1-indexed). I would find it very weird if that was written N^x instead.

@robryk Yeah, that's where I get stuck. The ordering in English is "Nth parent of x" so my brain wants to direct map that sequence ("N of x") to "Nx".

Maybe it would help me to think "git does it like Japanese": x の N

@mark

I'm thinking of it as a notation that invokes a "method" on the commit with a potential argument.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.