Git cheat sheets are a dime-a-dozen but I think this one is awfully concise for its scope.
- Visually covers branching (WITH the commands – rebasing the current branch can be confusing for the unfamiliar)
- Covers reflog
- Literally almost identical to how I use git (most sheets are either Too Much or Too Little)
Damn she has a ton of these helpful tech guides on her site under “Comics”.
My ideal workflow: make the smallest, fastest possible PRs so there’s no tomfoolery.
I need this poster or canvas printed so I can hang it on my office wall…
Looks like the original was “light mode”. The image is a colour-reversed image of the free PDF version which is on the creator’s site at the bottom of the page.
Direct PDF link: https://wizardzines.com/git-cheat-sheet.pdf
@CluelessLemmyng@lemmy.sdf.org @rand_alpha19@moist.catsweat.com
Yeah, for some reason I find this hard to read. I think it might be the lack of contrast between the fonts? Could be fixable by adjusting the weight instead of totally changing the font, though. (I would change the handwritten-looking one just because I find it kind of ugly.)
Oh, I color-inverted it…(;・.・)
The original is here, which is indeed light mode.
edit: see palor’s comment :P
Why not just use a gui? I don’t need something hanging on my wall because it’s all just easy clicking around. And when I do want to use the cli, it’s very easy to bring up.
aesthetic. need i say more?
Alternatively, the Git CLI is pretty flexible and inertia makes me stick to CLI-only lmao. Plus, PowerShell git completion is meh.
(Not that GUI is bad. GitHub Desktop diffing is pretty.)
I guess to each their own because having to hang a cheat sheet on my wall with got commands seems like the exact opposite of good aesthetics to me.
I use an excellent GUI that opens a terminal to run the commands you execute in it so that you can review the precise command in case you need to modify it.
GUIs tend to only cover the common/basic usage. Which is easy to remember without a cheat sheet. When you need more advanced stuff then GUIs tend to become more of a sticking point I find. And with common workflows it is far easier to automate with the CLI then with a GUI.
When you need more advanced stuff then GUIs tend to become more of a sticking point I find
What’s stopping you just opening the terminal in those rare cases? For 99% of my daily needs I’m good with a good GUI
Any half-decent GUI should cover everything shown in this cheatsheet. You’d have to do quite some voodoo witchcraft to need CLI these days. It’s actually the reverse sometimes, when my terminal bretheren complain that I do too much witchcraft when I’m just tidying stuff up with a GUI.
Other than untracking tracked files, I see nothing in this graphic that isn’t easy to do with a gui. That might even be easy to do but it is something I do in the cli. Can I get some examples?
I would also argue that the common/basic stuff is 99% of what I do with git. And for this I can’t fathom why people would think the cli is better. Like logging and diffing is just so much easier when I can just scroll and click as opposed to having to do a log command, scroll, then remember the hashes, and then write the command. This is something instantly available to me in a gui.
Don’t get me wrong, if the cli is better for you more power to you. We moved from p4 to git and I did this almost exclusively in the cli so I could use scripts more easily. And sometimes I watch beginners use the gui and I have to bite my tongue because I know it would be faster in the cli.
But, especially for a beginner, i strongly recommend a gui.
Missing the “oh shit need to fix this other thing but I am in the middle of a big change,” flow. I use git stash, but I wish I could include files that haven’t been added and I wish it could be tied to the branch
The only time I see a rebase fail is due to a conflict. Which can be aborted with git rebase --abort
no need for reflogs unless you really mess things up.
I’ll admit that in 10 years using git, I don’t think I’ve ever used reflog once.
It can be nice when you successfully do a rebase (after resolving conflicts), but change your mind about the resolution and want to redo it.
Doesn’t come up that much, but it’s been handy once or twice, for me. It’s also just nice security: no matter how I edit commits, I can always go back if I need to.
Maybe you resolved the conflict in the wrong way and want to restart after finishing the rebase.