Earlier quoted context omitted.
It's not anything inherent to a visual UI though, it's just that most of the UIs that exist are trying to put their own model on top of git, rather than embracing git's model. The one exception to this I've found is GitUp (mac only, sadly), and it's excellent. It's whole model is, "what operations can I perform on this graph," which is exactly the model git has. It's great.
I think you've put your finger on the schism of why so many git users prefer a GUI. The built-in porcelain is stupidly inconsistent and confusing. And yet, git's underlying model is so simple and powerful that I think it's worth suffering the bad CLI just to be more fluent and able to utilize git's power fully. The model itself is very easy to grok, it just takes some time to memorize the various random incantations…
Oh shit, git: Getting myself out of bad situations
401–410 of 520 posts
Re: Oh shit, git: Getting myself out of bad situations
#402> Oh shit, I accidentally committed to the wrong branch! I find cherry-picking to be easier in this case. Just checkout the branch and cherry pick commits from 'wrong' branch. https://git-scm.com/docs/git-cherry-pick
Re: Oh shit, git: Getting myself out of bad situations
#403Adopted a git GUI years ago and haven't looked back. I get looks sometimes, but I can't help but gloat when I can stage and unstage individual lines in less than a second. I think anyone who uses the CLI is either trying too hard or hasn't realized the beauty of a git GUI. Takeaways: - My commit time is usually much faster than coworkers, with higher accuracy (less frequent accidental commits, etc.) - I don't remembe…
Re: Oh shit, git: Getting myself out of bad situations
#404Adopted a git GUI years ago and haven't looked back. I get looks sometimes, but I can't help but gloat when I can stage and unstage individual lines in less than a second. I think anyone who uses the CLI is either trying too hard or hasn't realized the beauty of a git GUI. Takeaways: - My commit time is usually much faster than coworkers, with higher accuracy (less frequent accidental commits, etc.) - I don't remembe…
I use the git CLI. I do it for one reason. I know exactly what i'm doing on it. I have nothing to prove to anyone, I'm not trying to impress anyone with my "hacker" skillz. When I've tried GUI's, I'm not 100% sure what's going on under the covers. Sometimes they try to obfuscate things. While I'm probably not the worlds most advanced user, I know enough to know what I want to do, and how to do it. The CLI let's me do…
Re: Oh shit, git: Getting myself out of bad situations
#405Earlier quoted context omitted.
This is so wrong. :) With git you exactly do not have to backup your local workspace, because it already is backed up in git. If it is committed, it is safe. You can go back to it. If you messed up your branch, just reset it to something that was good. No need to do manual backups.
Sure it's wrong if you know what you're doing. But that's not who the blog post is for. Sometimes it's okay to take liberties with good practices - especially when learning, or when the world is on fire and a push needs to happen now .
The unwanted reality we live in.
Re: Oh shit, git: Getting myself out of bad situations
#406Earlier quoted context omitted.
Quick quiz, what does 'git checkout x/y' do? I am aware of users hitting at least 3 interpretations.
I'd say it changes your code to match that of a branch in your local copy of the repo.
Re: Oh shit, git: Getting myself out of bad situations
#407Adopted a git GUI years ago and haven't looked back. I get looks sometimes, but I can't help but gloat when I can stage and unstage individual lines in less than a second. I think anyone who uses the CLI is either trying too hard or hasn't realized the beauty of a git GUI. Takeaways: - My commit time is usually much faster than coworkers, with higher accuracy (less frequent accidental commits, etc.) - I don't remembe…
Re: Oh shit, git: Getting myself out of bad situations
#408Earlier quoted context omitted.
You already have git-revert, for reverting commits without rewriting history.
You're misunderstanding the purpose i'm describing. Imagine 100 commits a day, maybe more. (I worked at a company that averaged 500 or more commits a day to the master branch. There were 1000 developers working in a monorepo). Some code is out in production, and suddenly we realize a specific commit is causing a problem. The idea here is to revert the commit as soon as you can, and then spend your time fixing it. Whe…
Re: Oh shit, git: Getting myself out of bad situations
#409Earlier quoted context omitted.
You're comparing git to vim in terms of ease of use...
That's actually a rather good comparison. Both have learning cliffs of doom[1]but once you've spent a few months with them they're arguably more powerful than the other options. They're usually fast to use but very hard to learn. I wouldn't say either one is easy though. [1] https://dementiagaming.files.wordpress.com/2010/08/learning_...
Re: Oh shit, git: Getting myself out of bad situations
#410The fact web pages like this exist, and are popular, and make it to the top of Hacker News is all you need to know about git's ease-of-use and mental model. That Perforce and SVN don't get such things should also tell you something. (Which isn't to hate on git--it's a great tool.)
Unrelated topic (falling cats), same logical fallacy: http://www.radiolab.org/story/102525-vertigo/ (Starting around 14:20)