Live data from Hacker News

Git GUI or Command Line?

news.ycombinator.com

1–10 of 10 posts

Git GUI or Command Line?

#1
I am a junior and I use git via the command line. My boss thinks I am only trying to be fancy and that I'd be more productive using a GUI.

Is he right? Pls help.

Re: Git GUI or Command Line?

#2
Use git however you want to. I'd personally say that using it via command line is better because you're not tied to only knowing the GUI, so know how to use it on any machine with git installed.

Re: Git GUI or Command Line?

#3
If you normally work on your project using the command line (vim, emacs, &c) it's probably better to use git from the command line. If not, you should definitely learn to use command line git anyway even if you use the GUI normally because IMO it gives you a deeper understanding of the tool.

Re: Git GUI or Command Line?

#5
I use the command line all day every day. I also use SourceTree, however, maybe 3-4 times a day to see something visually (to commit a hunk, to quickly add individual files to a commit, etc).

I'm intermediate with git at best. I don't do anything fancy. I pull, branch, merge, push, and that's basically it. All day. I've used bisect precisely once about a year ago, I still don't know what rebase does... But I'm rock solid on the stuff I do know.

Given that I do things like:

git co -b feature/new-menu

git pull

git merge staging

git push

git co staging

git pull staging

git merge feature/new-menu

git push staging

Hundreds of times a day, there's simply no way it's faster to do it in a gui. I can type git co staging, git pull, git merge feature/whatever, :wq ( to close vim ), git push in probably 4-5 seconds now. I don't even think about it when I type it I've done it so often.

Get that fast at it and then invite your boss to watch. There's no way anyone could be convinced that a gui would be faster for me if they watched me pushing/pulling/creating/merging branches. They wouldn't be able to keep up.

(not a brag at all btw. These are simple tasks done hundreds of times every single day. You get really, really fast with that!)

good luck!

Re: Git GUI or Command Line?

#6
The command line is more powerful. You can pipe git's output to any other command line tool (like grep). It's easily scriptable.

Also, almost all documentation/HOWTOs you read will assume you're using the command line.

You're right to be using it. Even if you're not a power-user yet, you'll get there in time and will benefit greatly from it.

Re: Git GUI or Command Line?

#9
Both can be productive depending on what what you have practised. Being good at command line will give you one more ability - "compose" various commands together to do complex task in a single command whereas the GUI guy can't do that as you can't compose "pixelated output". Think of this like - to do some task in GUI the guy will do something like - click, wait, click, type, wait... where as the command line guy would just write a single command composed of other commands.