Live data from Hacker News

Oh shit, git: Getting myself out of bad situations

ohshitgit.com

111–120 of 520 posts

Re: Oh shit, git: Getting myself out of bad situations

#111

A git off my lawn moment: Every time I see someone complaining because they have to dive into the reflog to fix their own mistake, all I can hear is "I was operating my table saw without using a push stick and can't understand why I lost a thumb". Friends don't let friends (especially those who don't learn how to use their tools) rewrite shared git history. If you don't understand rebase, amends, etc can do to your (…

On the other hand, doing it is the only way you're going to learn. Just do it in a safe environment, with a snapshot of the repository.

practicing safe version control is better than abstinence

Re: Oh shit, git: Getting myself out of bad situations

#112

Adopted 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…

What GUI do you recommend? My experience has been that GUIs are the easiest and fastest way to make a mess that can't be corrected without dropping to CLI or re-cloning. (I'm looking at you SourceTree). I've long recommended that everyone who uses git know how to use the CLI even if they don't use it regularly.

Not the OP, but git cola works great for me.

https://git-cola.github.io/

Re: Oh shit, git: Getting myself out of bad situations

#113

My last git mistake was pretty terrifying. I decided to try and go back to an old commit on a project on my local machine after about a days work. Somehow I ended up making the commit I wanted to revert to a new branch, then somehow tagged that branch with the name of the commit making git get angry and decide that branch wasn't valid. Then continuing in my ignorance I reset to that branch and tried to checkout only…

Git is not a backup! Had you had one, you could have had your mind at ease.

Re: Oh shit, git: Getting myself out of bad situations

#114

Adopted 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…

What GUI do you recommend? My experience has been that GUIs are the easiest and fastest way to make a mess that can't be corrected without dropping to CLI or re-cloning. (I'm looking at you SourceTree). I've long recommended that everyone who uses git know how to use the CLI even if they don't use it regularly.

I recommend SmartGit; it's not cheap, but it's really, really nice.

Re: Oh shit, git: Getting myself out of bad situations

#115
post #96

This is why UI's were created. No productive person wants to fill there heads with a ton of commands and switches when you could just click a button.

Which button? What happens when I click it? Am I going to have to remember this later?

It’s all “choose your abstraction”, so you’ll be filling your head with something whether it’s which button to push or what git checkout does. GUI or not, no button alt text is going to tell you what rebase means.

Re: Oh shit, git: Getting myself out of bad situations

#116

Earlier quoted context omitted.

What GUI do you recommend? My experience has been that GUIs are the easiest and fastest way to make a mess that can't be corrected without dropping to CLI or re-cloning. (I'm looking at you SourceTree). I've long recommended that everyone who uses git know how to use the CLI even if they don't use it regularly.

Magit in emacs. Probably one of the killer applications for emacs.

+1, along with Tig (console gui).

Re: Oh shit, git: Getting myself out of bad situations

#117

Earlier quoted context omitted.

What GUI do you recommend? My experience has been that GUIs are the easiest and fastest way to make a mess that can't be corrected without dropping to CLI or re-cloning. (I'm looking at you SourceTree). I've long recommended that everyone who uses git know how to use the CLI even if they don't use it regularly.

Not the OP, but I had come from SourceTree to GitKraken and it's a joy to use.

Same for me! I used SourceTree in the past but at the moment I am using the free version of GitKraken for private projects and I am very happy.

Re: Oh shit, git: Getting myself out of bad situations

#118

Adopted 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 think anyone who uses the CLI is either trying too hard or hasn't realized the beauty of a git GUI.

Or, you know, understands and thinks in the semantics of the underlying tool and is already working in other text-based tools.

Re: Oh shit, git: Getting myself out of bad situations

#119
post #86

Adopted 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 think anyone who uses the CLI is either trying too hard Why do you think it's okay to share this opinion?

What makes you think it is not?

Re: Oh shit, git: Getting myself out of bad situations

#120

Adopted 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…

What GUI do you recommend? My experience has been that GUIs are the easiest and fastest way to make a mess that can't be corrected without dropping to CLI or re-cloning. (I'm looking at you SourceTree). I've long recommended that everyone who uses git know how to use the CLI even if they don't use it regularly.

I use sourcetree and it's pretty great, especially the aforementioned block-level staging.
Post reply on HN