News for hackers. Stuff that matters.

Git GUI or Command Line?

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.

( 9 comments | 6 points | on HN )
Re:Git GUI or Command Line? by saltcod on Wednesday March 16, 2016 @08:42PM (#11301849)
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? by ankurdhama on Thursday March 17, 2016 @01:29AM (#11302745)
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.
Re:Git GUI or Command Line? by nperez on Wednesday March 16, 2016 @08:53PM (#11301893)
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? by CyberFonic on Wednesday March 16, 2016 @10:28PM (#11302221)
Can your boss use git from the command line? If not, then it's probably his ego taking a hit! But he's the boss ...
Re:Git GUI or Command Line? by chocolatepi on Wednesday March 16, 2016 @08:29PM (#11301793)
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? by LukeB_UK on Wednesday March 16, 2016 @08:20PM (#11301752)
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? by plugnburn on Thursday March 17, 2016 @01:40AM (#11302772)
Commandline only. Especially if you define some bash macros.

If you don't know git command, you don't know Git at all.

Re:Git GUI or Command Line? by tjons on Wednesday March 16, 2016 @09:06PM (#11301937)
I find the command line far more helpful.
Re:Git GUI or Command Line? by omidam81 on Wednesday March 16, 2016 @08:35PM (#11301820)
using command line is better idea, if you know the commands well it really easier than using GUI