7 ms·
This image helped me a lot: https://nitter.net/pic/orig/media%2FFjJ62xKXkAYfFjt.jpg https://nitter.net/pic/orig/media%2FFjJ62xKXkAYfFjt.jpg
by criddell 3y ago
This image helped me a lot:
https://nitter.net/pic/orig/media%2FFjJ62xKXkAYfFjt.jpg https://nitter.net/pic/orig/media%2FFjJ62xKXkAYfFjt.jpg
- nelsonfigueroa 3y agoWow this is great. Wish I came across something like this back when I was learning git.
- boneitis 3y agoAs someone who's having a very difficult time coming to grips with git, would really appreciate another source for this. It does not load for me, in the eight ways I have tried to load it (two devices each on a different IP, on two browsers, with that %2F left encoded and attempted with it unencoded.)
- 6581 3y agohttps://twitter.com/bibryam/status/1601499207977693184 https://twitter.com/bibryam/status/1601499207977693184 https://twitter.com/bibryam/status/1609979930351132683 https://twitter.com/bibryam/status/1609979930351132683
- Given_47 3y agoFor posterity here’s [1] a list of Nitter instances. The flagship one (Nitter.net) always gets overloaded [1]: https://github.com/zedeus/nitter/wiki/Instances https://github.com/zedeus/nitter/wiki/Instances
- tempest_ 3y agoHonestly the picture shown in that thread are fine and most people I have met grok those commands really quick. The issue is git's interface is terrible and very powerful. Which means when something goes awry and they land outside those 5 or 6 commands they often have no idea how to fix it. Which invariably leads to a copy paste of their changes and a delete and re-clone. Honestly I really like mercurial. I found its interface better but in this day and age all the tooling is built around git so ...
- boneitis 3y ago> ..when something goes awry and they land outside those 5 or 6 commands.. Yes, this. I have no problem adding, rm-ing, branching, making and accepting PRs, etc. These are what the overwhelming majority of git for dummies tutorials cover. (I've even paid for a very well-known and well-reviewed course and completed it.) And, these photos upthread are fantastic for that initial git-101 progression. Then, I eventually landed my first tech-sector job and still haven't picked up much more since. My solution to every ounce of apprehension is deleting and re-cloning out of paralysis and fear. I find great difficulty in being able to glean a repository's "environment" in a sense analogous to gleaning the environment of an initially compromised machine (the foothold) when you've popped a fresh shell on a boot2root box. (I thank the digital gods for IppSec and his hands-on videos that teach you how to clear up the fog of war around you!)
- slavik81 3y ago> My solution to every ounce of apprehension is deleting and re-cloning out of paralysis and fear. Having worked with older version control systems, I found that to be one of the best things about git. If I had a problem with a version control system like AccuRev, that sort of simple fix was not possible. Your every action resulted in a change of the server state, so if you got your workspace into a confusing state, the confusion would be synced to every machine. These days I understand git well enough that I can fix just about any mistake, but the 'delete and start over' workflow was extremely valuable to me as a beginner. Knowing that there was a foolproof fallback of just deleting and recloning let me experiment without fear.
- raincole 3y ago> The issue is git's interface is terrible and very powerful. Git is basically that a programming language. The time you need to "master" git is comparable to "master" a programming language. I'm being writing code for more than half of my lifetime so far, and every time I need to use an unusual git command I feel like a script kiddo who copies and pastes from SO.
- masklinn 3y ago
- messe 3y agoIt's missing: git diff > ../i-messed-up.patch cd .. && rm -rf $REPO git clone $REMOTE cd $REPO && git apply ../i-messed-up.patch
- cakemuncher 3y agoWhy apply i-messed-up on main/master? Am I missing a meme here? What's the point of this?
- Pxtl 3y agoIt's basically automating the workflow described here: https://xkcd.com/1597/ https://xkcd.com/1597/
- u801e 3y agoThough, if you know enough to edit diffs by hand, you could use git apply --cached to stage parts of the diff in a way to make a sensible set of commits instead of a single commit for a large change.
- PlunderBunny 3y agoI'm probably showing my ignorance of what is possible/required, but I'd like to see a GUI front-end for Git that looked like the background of this image, where each commit was a lozenge that I could just drag from one column to the other. Maybe individual files could be circles inside the lozenges. Just drag-and-drop, and the front-end figures out all the underlying Git commands to use.
- paulddraper 3y agoWow that is great!
- gorgoiler 3y agoI don’t recommend git pull to anyone. The magical ways that .git/config sets up tracked vs untracked branches are too opaque for me. It’s always been much easier to understand (and explain) what’s going on when you separate fetch from rebase/merge*, and I feel like all these “just re clone and start again” memes are all because people’s branch tracking broke and they wanted magical “git push # no further args” to work properly again. Once you know how to “git push remote myref:theirref” you become much less dependent on magic. Knowing about / having to know about how it works internally is the fun / tedium of git. *Just kidding about doing git merge, btw. Linear history for life!
- nvy 3y agoYep. I've been using git for years and still don't really understand the difference between fetch, checkout, and pull. The official docs are dogshit so I just don't have time to figure out the minutiae.
- gorgoiler 3y agoFetch means “safely fetch new data from one of your remotes without affecting any of your local work”. Pull means “do what fetch does, but with the spicy bonus risk that your precious work will be modified in an unexpected way depending on when and how you checked out the branch you’re on, what version of git you are using, and what config options you have set.”
- globular-toast 3y agoCan pull screw up your working directory if you haven't committed something? I thought that was reserved for `reset --hard`. In any case, I always teach people to commit more. As long as you commit, you can't lose anything.
- seba_dos1 3y agoMost confusion I've ever seen from beginners comes from them trying to pull, ending up in a conflict and not realizing, not resolving it but not aborting either and just continuing their work and then getting confused when trying to do anything else.
- Nezteb 3y agoOriginal source along with some of their other git content: (Nitter search sometimes returns no results, so just refresh if that happens) - https://nitter.net/search?f=tweets&q=from:@NikkiSiapno+git&f-images=on&since=&until=&near= https://nitter.net/search?f=tweets&q=from:@NikkiSiapno+git&f... - https://nitter.net/search?f=tweets&q=from:@ChrisStaud+git&f-images=on&since=&until=&near= https://nitter.net/search?f=tweets&q=from:@ChrisStaud+git&f-... For folks who enjoy visual guides, here are a few more I'm aware of: - http://marklodato.github.io/visual-git-guide/index-en.html http://marklodato.github.io/visual-git-guide/index-en.html - https://mukulrathi.com/git-beginner-cheatsheet/ https://mukulrathi.com/git-beginner-cheatsheet/