this post was submitted on 24 Sep 2024
7 points (100.0% liked)

Programming

19650 readers
377 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

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)
top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 6 months ago

My ideal workflow: make the smallest, fastest possible PRs so there's no tomfoolery.

[–] [email protected] 1 points 6 months ago (1 children)

I need this poster or canvas printed so I can hang it on my office wall...

[–] [email protected] 2 points 6 months ago (1 children)

but in light mode, right? ... right?

screams in ink spill

[–] [email protected] 1 points 6 months ago

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

@[email protected] @rand_[email protected]

[–] [email protected] 1 points 6 months ago (2 children)

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

[–] [email protected] 1 points 6 months ago

That sounds like the perfect situation to use git worktree.

[–] [email protected] 1 points 6 months ago

I've stopped using stash and mostly just commit to my working branch. I can squah that commit away if I want later. But we squash before merge so it doesn't tend to be worth it.

It's just less things to remember.