6 ms·
Visual Git Cheat Sheet
- kamray23 5y agoA really nice illustration, but it's a bit unclear on a few things (especially stashes), and it can give off the impression that git commits not only track "changes" but in fact are changes instead of what they really are, that is, snapshots of the repository at a particular moment.
- crgi 5y agoNice graphic, but it’s missing the push command…
- kubanczyk 5y agoAnother thing, the `git stash` subcommands can operate on index as well.
- sharken 5y agoWas looking for that as well. Also there should be another line with 'checkout -- <file>'.
- tryingtogetback 5y agoIf you click on local or remote columns you'll see it there
- oracardo 5y agoClick the "upstream repository" column. I didn't realize the columns were clickable at first.
- ndp8 5y agoIt's there if you select local or remote repo.
- zwaps 5y agoThis shows only the headings of the 5 categories and then empty bars on Firefox... could you offer a pdf or picture as an alternative download for people who don't use (I suppose) Google Chrome?
- mos_basik 5y agoYou may be blocking the javascript needed for this page to render properly. I'm on Firefox 92.0.1, saw what you saw at first, then in uMatrix I enabled "script" coming from "code.jquery.com". Page renders fine now.
- morris082 5y agoFelt like it complicated things rather than clarified. For a newcomer to git I imagine it could be overwhelming.
- sakesun 5y agoIn general, a cheat sheet is not about clarity, and not target for the newcomer.
- stblack 5y agoI love this cheat sheet and yes, it's not obvious that you need to click the boxes to see all commands emanating, or arriving, into that box. The GitHub repo: https://github.com/ndp/git-cheatsheet https://github.com/ndp/git-cheatsheet
- sundvor 5y agoThanks, I missed that! Have saved this now for reference.
- naikrovek 5y agowhy do these things show me things I know, and never the things I don't know? like workspace vs. local repo. that IS NOT explained, but all kinds of stuff about stashes is present. people that know git very well have no clue how to teach git to others. none.
- bgro 5y agoI'm an expert in git, but at a glance I don't see what you're trying to do here. It's like dumping an alphabetical list of methods on someone. An expert already knows them, and it's a weird way to present it to someone new to coding. All this information is already natively available in the help menus, and new people should probably generally stick to things like egit if they're completely lost and need a beginning grasp imo.
- stblack 5y agoJust for information, this site and this repo have been around since 2010. Click a box and you get all that's coming, and all that's going, to that box. Hover over a command and the display area at the bottom of the screen explains the command. If you're looking at this on mobile, and puzzling why this might be a great thing, this predates your device's tech by a very long time.
- SavantIdiot 5y agoI needed to read the comments here to understand what I was looking at. Interesting way to present everything. I can't believe this is 11 years old.
- belltaco 5y agoWhy is git the hardest to grok for most developers compared to almost anything else in the web dev ecosystem? It always feels like a tool with very less or very leaky abstractions. Is it because the complexity is really needed, or if papering over them and making it user friendly has failed? For example, you won't find a cheat sheet of SQL commands submitted and upvoted so many times on HN, even though SQL implementation and internals are very complicated. Reason being it's able to hide the implementation details and abstract it away. At the very least the terminology in git is very confusing. Especially 'checkout' for people who came from a SVN/CVS background.
- RobertRoberts 5y agoIs it because of trying to use too many features? Or working with large groups and everyone trying to do too much? I've been through 3 source control systems now, and Git is by far the easiest. I only branch, clone/init/add/commit/push/pull and merge. (And now most through the gui in vscode) There are some minor fixes I've had to look up, but it's rare. Almost all the complaints I hear about are from very obscure commands and situations I've never seen. Is using Git in a simple way the answer to everyone's problems with it?
- rgoulter 5y agoUsing Git only in a simple way isn't quite the answer to problems, because if you make a mistake, you'll still need to use non-simple commands to get yourself out of it. When my level of understanding of git was "add/commit/push/pull", if ever I made a mistake, I'd then have to try a more sophisticated command which would then risk making another mistake.
- pdimitar 5y agoAt one point you'll have a long-living feature branch which you'll have to periodically rebase with the main branch, and this is where nightmares begin.
- brundolf 5y agoFor me it's because it's highly stateful, and in ways that are mostly invisible. You have to keep in your head whatever state your repository is currently in so you know what actions you can/should take next. And if you wander off into a bad state, it can be nearly impossible to chart your way back blind unless you've been there a few times before. It's like playing the world's worst text-based adventure game. I think the above problems mainly come down to the fact that it should be a GUI but isn't. Which is why so many GUIs are built on top of it, but then they're shaky because they depend on a CLI which is itself trying to be GUI-like. I would honestly take a text-mode GUI over what we have, and I don't even use text-mode GUIs normally. I always say, git is the worst VCS except for all the other ones.
- 29athrowaway 5y agoAnyone out there learning Pijul?
- stevage 5y agoThey didn't include git push?
- gmathews 5y agoGreat idea doing this! If the author is reading, just an observation; because the local repository column is pretty solidly coloured, I kept confusing it with the selected column.
- gizdan 5y agoThe website captures left/right arrow indiscriminately of modifiers, causing short cuts like Alt+Left and Alt+Right to go back/forth in the browser history.
- jcourt1 5y agoWhy isn’t git fetch included? Having worked with a quite a lot of developers who don’t understand git, many of whom know so many things I don’t when it comes to so many other domains of dev knowledge, it always astonishes me that people don’t understand what is happening underneath when they do a git pull. I feel like the two main reasons people don’t understand git is that they start by using a GUI instead of starting with the command line, and that they don’t understand fetch.
- deleted 5y ago[deleted]
- treesprite82 5y ago`git fetch` is included - note that you have to click the other columns to see commands relating to them.
- jcourt1 5y agoMy bad. It looks quite a useful reference but suspect it would be overwhelming if you haven’t already understand the key ideas. My point was really that understanding git doesn’t need to be overly complicated in the end, if you just focus on key concepts, such as the notion of git fetch updating the remote branches within the local repository (and hence status being a reflection of that)
- egberts1 5y agoIs it just me or did we notice that there is a missing something to “push” the repo to its offsite repo? Edited: the columns are clickable.