6 ms·
Interactive Git Cheatsheet
- modzu 8y agothis one is pretty funny: http://justinhileman.info/article/git-pretty/git-pretty.png http://justinhileman.info/article/git-pretty/git-pretty.png
- jasode 8y agoI'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.
- brokenwren 8y agoAm I missing something or is there no `git push`?
- niel 8y agoPush takes place between your local and remote repo. When you click on either, you'll see remote/local repo commands, including push.
- ranie93 8y agoClick on the "Local Repository" column
- brokenwren 8y agoAhhhh. 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.
- deleted 8y ago[deleted]
- sabujp 8y agoit's missing git fetch and bunch of other stuff
- niel 8y agoI'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".
- frant-hartm 8y agogit fetch is right there between local and upstream repository.
- deleted 8y ago[deleted]
- npalmer 8y agoLooks like the site is struggling at the moment, cached version here: http://web.archive.org/web/20180914141513/https://ndpsoftware.com/git-cheatsheet.html http://web.archive.org/web/20180914141513/https://ndpsoftwar...
- m4r35n357 8y agoLooks like that is down too now . . .
- berti 8y agoI 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
- epicide 8y agoI 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.
- jacobsenscott 8y agoThis is actually a good learning tool, and not just a cheatsheet. Understanding how the data moves around the different parts of the git repository is half the battle.
- epicide 8y agoLike I said, I think it's a step in the right direction. It provides a bit more guidance than a typical cheatsheet, but I'd still consider it mainly a cheatsheet. It doesn't really show how data moves around the different parts as much as it hints that something moves into these nebulous buckets when you run certain commands.
- kstenerud 8y agoThe 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.
- octosphere 8y ago> The problem is that git has terrible U/X. I know this pain. Trying to debug a merge conflict for the first time is like trying to do open heart surgery with no prior training.
- stblack 8y agoThis 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 8y agoWhat 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.
- deleted 8y ago[deleted]
- ArtemZ 8y agoThis cheatsheet has almost as bad UX the git itself
- modzu 8y agonobody has mentioned the other popular cheatsheet called github desktop?
- esaym 8y agoI only recently started using 'git stash', thanks to this quick script: https://gist.github.com/Ovid/e7ddc56c4710c1baae228b7e4dd3cf77 https://gist.github.com/Ovid/e7ddc56c4710c1baae228b7e4dd3cf7...