There's also an interactive "Git by Example" guide I recently wrote on a similar topic. It has a playground for each of the commands mentioned in Martin's article (and many others):
What do you mean by "git cp"? I have that aliased to "cherry-pick".
If you mean to copy a file/directory and stage it in the process (like "git rm" does for deleting), there's no need to rebase. Just copy the thing and stage it.
If it's something else, then the 2 paragraphs above might be a hint towards why there isn't one.
I barely know anything about git but one thing I do know is worktrees are the only way I can use it. My mind just doesn't work in a "only one or two branches at a time" mode
For longer lived, bigger projects, absolutely.
For smaller stuff, not as much. I use it everyday for $work, but rarely/if at all for any small personal stuff.
I just learned about worktree (from a recent HN post IIRC) and thought it sounded really helpful for working on multiple simultaneous tasks in nixpkgs. Unfortunately I ran into some error trying to add a second worktree. Will have to take another look.
— switch
— restore
— sparse-checkout
— worktree
— bisect
https://antonz.org/git-by-example/