Git Commands Explained with Cats (2017)
girliemac.com
girliemac.com
- Introduction to Programming & Tools
- Machine Learning Regression
- Notes from Presenting Data & Information course by Edward Tufte
- Notes from The State of Web Platform
And her list of other Tech Doodlers & Sketchnote artists to follow (https://girliemac.com/blog/2021/07/12/microsoft-beginners-sk...).
That is to say: I totally benefit from "git commit --amend && git push --force-with-lease" but 100% percent of the time want that flow to call time-out if someone has pushed before me
https://stackoverflow.com/questions/30542491/push-force-with...
This probably isn't for everybody but if you like tech && cats, I made "HTTP Status Cats" a long time ago too. I believe that one satisfies more of you.
(I don't own the website or the awesome domain name, but the original HTTP Status Cats images are done by yours truly!)
Most of my fellow devs are from a 3D modeling and design background and have a hard time understanding anything more than push and merge (using a GUI). I tried to explain them numerous time, but they just phase out after a couple of minutes.
I doubt there is a target audience which fails to comprehend the un-doodlified versions of these doodles, and is helped significantly by the cats and colorfulness.
We own four cats in our household, aged 16-25. So they’ve been around almost as long as I can really remember. In all that time, anything I’ve been capable of doing I do much worse and much more slowly when they are present. Playing piano, cooking dinner, writing code.. all crumble in the face of a cat that wants a warm lap (and won’t shut up about it).
Understanding git doesn’t feel any different, just more extreme. Anyone who tells you that they fully understand git is mistaken, lying, or named Linus. How is adding cats going to fix that?
I just like seeing the visual feedback of the actions I've just done.
GitExtensions[1] vastly improved my life. It is a wonderful program.
I wish the docs weren't so abysmally bad, and I wish it did a better job abstracting away the internals.
I don't have time to learn about git's arcane internal shenanigans. I just want version control.
What makes git any less intuitive compared to svn or cvs? To use either of those or git effectively required reading through documentation to understand what each command did.
I myself have “no issues” with git but conflict resolutions are still a guessing game when they’re for middle commits
For both cvs and svn, creating branches, merging changes from different branches, and switching branches definitely were operations that required a few steps that would not be easy to figure out without reading through the documentation.
The only thing that git had that those programs didn't was the concept of a staging area, which, as I understand it, bazaar and mercurial didn't have (unless you created another copy of the repo or another branch to serve as a staging area). But the fact that people have tried to replicate that feature in the other DVCSs indicates that it's a desired feature, even if it does add some complexity compared to not having it.
There's a wider argument here of whether notes should be used for personal recall or general reference. I tend to lean towards the former, but there's more nuance here.
I'm working on a blog post that discusses how to take good sketchnotes and breaks down this argument a lot further, but it's already super long and far from being finished... perhaps I'll finish it someday, haha.
Kudos to the original author of these notes. When taking these types of notes, you have to think about what to leave out as much as what to leave in. I think that concise notes in this style to show that the author has a deeper understanding of the subject than the notes convey on the surface, especially when the point of these notes are to compress one's knowledge on the subject into a concise visual representation.
Sketchnotes are macroexpand for the brain :P
The latter has been optimized with good notation and has a fairly simple structure, whereas Git is a beautiful idea wrapped in an API from hell
In other words, go from
old your
master master
----*----*----A----B----C----D
\
\ new
\ master
\----*----*
to old your old
master master
----*----*----A----B----C----D
\
\ new your
\ master master
\----*----*----A'---B'---C'---D'
Interactive rebase allows you to choose to reorder, rename, combine or drop those commits A, B, C, D as they are applied to new master.FYI replay is the term used in the git docs, which otherwise make little sense.
Rebase means moving the branch point of your feature branch to later on the main branch.
Let's say you create feature branch foo from main on 2021-08-01. You do work. Others do work and add them to main. On 2021-09-18, you rebase foo onto main. This has the effect of re-writing history! There's no longer a branch point at 08-01, it's been moved to 09-18.
https://www.atlassian.com/git/tutorials/merging-vs-rebasing
Rebase is not always the best option. I personally prefer merging, and that has worked for 100% of situations I've found myself in so far in my DevOps career.
> Rebase means moving the branch point of your feature branch to later on the main branch.
It refers to a more generic action/set of actions, where this description is one possible end result. Granted this is probably the most common use, and the name "re-base" definitely fits this usage best.
The more generic action is something like "take a set of commits in one place in the git history, and reapply them somewhere else in the git history, optionally dropping or rearranging some of them in the process".
So if you check out on day 0 and rebase on day 5, then it becomes "pretend I started coding on day 5 in the first place, and let me correct any contradictions (conflicts) as though I was making those decisions as I was making each commit".
I still struggle but this helps me conceptualize it.
Author has a nice repo with other doodles:
https://github.com/girliemac/a-picture-is-worth-a-1000-words
I really wish there were some way to find and navigate good OERs like these.
VS Code can render PNGs, so you can hit the period key on GitHub and just navigate the repo's PNG folders.
My qualm with most available explanations back then were that they all start from command line with no visual explanation.
Now if you understand that it's a linked list, where nodes link to previous node instead of next, branches and tags and everything starts to make sense.
There are zillions of introductory tutorials that are much easier to understand.
I wonder who the target audience for such drawings actually is.
I wonder if having Mercurial continue in python is a development advantage, or it just started out that way but now would benefit from a more performant version
I find git is just similar enough to older VCS systems trip one up dangerously.
https://www.codemag.com/article/1105101/Git-for-Subversion-U...
caveat: I have only skimmed it.