What Drove Me to Git on the Command Line

This past Wednesday I had a chance to to my first #WDSLunch. Something we’re trying over at WebDevStudios– a brief session of hanging out and learning something new with team members. I presented a topic about Git on the command line.

I’ve been doing a lot of Git lately, and about 2 months ago, finally switched to Git exclusively on the command line. After showing off some of my workflows and answering some questions I had a revelation about why I had switched. It’s just easier.

Sure there are tools, like Tower, and SourceTree that help you do Git tasks in a GUI, but they cost you time and effort. That was a big thing to me. Eliminating time and effort, in most cases, boosts productivity.

When I used Tower, I was constantly adding repos. I needed to touch something temporarily, I’d add it in Tower. I’d do some stuff, make some commits, and then what? Sometimes the repo would stick around and sometimes I’d delete it. After a few months of usage, I had a ton of repos listed in the GUI. Some were active projects, some were old projects, and some were temporary repos that had since been deleted. It was a mess.

I’ve always been a fan of the command line so I tended to be doing things in it at some point during the day. Why not manage my Git repos there too? I mean, when you do Git on the command line, things are just “there.” There’s no GUI to set things up in, nothing to manage. If you’re in a directory that’s a Git repo, you’re good to go.

One thing that helped facilitate this was switching my shell to ZSH + Oh My ZSH + Agnoster. It makes things easier because it highlights when you’re in a repo, and it’s current status. This certainly isn’t the only setup like this, but it’s what I’m using.

Now I can just do Git. No need to open a fancy GUI just to add a repo so I can manage it. This alone has changed how I work, and even more importantly, how I think about version control.

5 thoughts on “What Drove Me to Git on the Command Line”

  1. The CLI wins for most commands but how do you visualize large team based repos with multiple branches, commit messages, history, tracking #’s., etc.

    1. I have a bunch of git aliases for logging and history. You can find them in my dotfiles repo.

      `git lol` / `git lola` are two of the more common ones you’ll find. They’re for the graph log (alternatively showing all branches). They’ll output something similar to this:

  2. I’ve never used zsh before but that theme makes it look pretty awesome. As for git via cmd line… I learned it that way… tried some of the apps and couldn’t stand them.. I feel I had no control at all. Terminal ftw. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>