
Interactive Git Cheatsheet - taatparya
https://ndpsoftware.com/git-cheatsheet.html#loc=workspace;
======
jasode
I'm not criticizing the cheatsheet and can see how it can help but if I may
point out 2 possible points of confusion for Git novices:

If the conceptual boxes of "stash", "workspace",...,"upstream repo" represent
a left-to-right _timeline_ of workflow, having "stash" being on the left of
"workspace" is somewhat misleading. A stash point-in-time usage can be thought
of in the same vertical time-alignment as "index" or "local repository".

If the conceptual boxes represent a _storage model_ , then stash being a
separate isolated box is somewhat misleading. The stashes are actually _stored
in_ the "local repository". (E.g. an alternative diagram would show "index"
and "stash" as nested boxes _inside_ of "local repository".)

I readily admit that spatially rearranging how "stash" is diagrammed
complicates the arrows illustrating the git commands. Therefore, maybe the way
the cheatsheet did it is the best compromise.

------
epicide
I understand why everyone wants git cheatsheets (there are a lot of commands),
but I have yet to see a cheatsheet/etc that does little more than become a
crutch.

For better or for worse, git really demands that you learn the concepts and
fundamentals. It has a steep learning curve, but it's one that easily pays
dividends.

Do I wish it were easier to learn? Of course.

Can you substitute actually learning how git and its workflows are used with
cheatsheets and quick primers? Not remotely.

That being said, I think this one is a step in the right direction by being
interactive. Something like a "git simulator" could be incredibly powerful in
teaching people git.

~~~
kstenerud
The problem is that git has terrible U/X.

The commands are unintuitive, have defaults that nobody uses, and use names
that are prone to misinterpretation because they have completely different
meanings from what you'd expect.

It's not only difficult to learn; it's difficult to remember the commands and
the switches you have to add every single time (why?), and all the extra
commands you have to throw in just to get from a checkout to a complete
working tree.

Git's UI really needs an overhaul. Unfortunately, I fear it is already too
late.

~~~
da_chicken
This is it exactly.

I'm really kind of tired of the "git demands you understand the concepts and
the model" excuse because that really isn't what's going on. It's just a poor
interface with an un-intuitive set of commands that are organized according to
what makes sense to the person who developed the software rather than what
makes sense to a person using the software.

Lots of systems demand that you learn the underlying concepts and structures.
Indeed, nearly _all_ computer systems demand that when you get to a developer,
operations, or admin level. It's actually kind of condescending to keep seeing
people repeating that over and over. It's not difficult to understand that git
is basically a repository of a repository. If you already understand branching
and merging from SVN, it's easy to explain git with a single image[0]. It's
still difficult _to learn to use git_ and absolutely nothing about the
software eases that transition. Claiming the problem must be with the user and
their inability to learn the system should clearly have been incorrect
somewhere around 8 years ago when people were still struggling to learn it
after it had been out for 5 years.

I imagine some day we'll run into a situation that's similar to apt vs apt-get
vs aptitude where there are multiple clients that do the same thing, but it's
not clear to me if someone will just create a better product before that time
comes along (that product is probably the GitHub client).

[0]: [https://images.osteele.com/2008/git-
transport.png](https://images.osteele.com/2008/git-transport.png)

~~~
massaman_yams
Another comparison: iptables with its hard-to-remember syntax, vs ufw.

As UFW is just a wrapper for iptables, I wonder if there's a real possibly of
a Git replacement just being a wrapper that simplifies the syntax and maybe
some of the conceptual model.

~~~
mayormcsheese
gitflow is just that

------
stblack
This cheatsheet has been around for years. Nothing has helped me grok git
better than this cheatsheet.

Here is its Github repo: [https://github.com/ndp/git-
cheatsheet](https://github.com/ndp/git-cheatsheet)

~~~
photos_victim
What really helped me grok git was [https://git-man-page-
generator.lokaltog.net/](https://git-man-page-generator.lokaltog.net/) which
taught me that the commands and the documentation of git really are pure
nonsense, which relieved me from the feeling that I just wasn't seeing the
underlying beauty.

------
berti
I think they've been HN'ed. I'm guessing a stylesheet failed altogether in my
browser because it's unreadable.

wget [https://ndpsoftware.com/git-
cheatsheet.html#loc=workspace](https://ndpsoftware.com/git-
cheatsheet.html#loc=workspace) 0.05s user 0.01s system 0% cpu 51.874 total

------
modzu
this one is pretty funny:

[http://justinhileman.info/article/git-pretty/git-
pretty.png](http://justinhileman.info/article/git-pretty/git-pretty.png)

------
brokenwren
Am I missing something or is there no `git push`?

~~~
ranie93
Click on the "Local Repository" column

~~~
brokenwren
Ahhhh. I had no idea this thing was interactive. That's not intuitive at all.
The only that that indicates that is the "Interaction" in the title and I
skipped over that part and just start reading the commands.

------
npalmer
Looks like the site is struggling at the moment, cached version here:
[http://web.archive.org/web/20180914141513/https://ndpsoftwar...](http://web.archive.org/web/20180914141513/https://ndpsoftware.com/git-
cheatsheet.html)

~~~
m4r35n357
Looks like that is down too now . . .

------
esaym
I only recently started using 'git stash', thanks to this quick script:
[https://gist.github.com/Ovid/e7ddc56c4710c1baae228b7e4dd3cf7...](https://gist.github.com/Ovid/e7ddc56c4710c1baae228b7e4dd3cf77)

------
modzu
nobody has mentioned the other popular cheatsheet called github desktop?

------
sabujp
it's missing git fetch and bunch of other stuff

~~~
niel
I've mentioned this on another comment. Click on either "Local Repository" or
"Upstream Repository" to see the repo-related commands.

Edit: Had "Remote Repository" instead of "Upstream Repository".

