Sitemap
A. Tate Barber

A. Tate Barber

Developer, husband, and DIY farmer.

Got Git?

4 min readJul 5, 2016

--

Press enter or click to view image in full size
Photo by Marco Leong

Git is awesome. If you don’t believe me, just ask the internet. Now there are hundreds of thousands of development tools, protocols, frameworks, libraries, and platforms out there, and when I begin thinking of this, I am amazed that there are only a few that stand out, are adopted worldwide, and considered an industry standard. Git has been used long enough to earn its merit badges, and though it is so common, I feel that git needs this little blog post to praise it’s everyday benefits.

Git Makes Me a Better Programmer

If you use git, you have already taken the next step into becoming a better programmer. You are backing up your code, creating versions you can “checkout” and review, and (more than likely) allowing other programmers to see your code progress.

If you are like me, while you were new to git, you would just code away and commit every few days or so with commit messages like this:

$ git add -A
$ git commit -m "Huge freaking commit! Lots of stuff was changed!"

This was nifty for a while, but eventually I stopped seeing the importance of git; to me, it was simply a way to publish and pull code around without dragging and dropping via FTP. Though this was a step, I was still hindering myself from becoming a better programmer and using git correctly. Unfortunately, I still do this at times when I get lazy and unmotivated with a project.

Branches

Branches also enhance my skill level as a programmer. The whole idea of a branch is to test out new changes without affected another environment of my code. Most commonly, a “master” and “develop” branch can be found in most git repositories, however when I begin to use feature branches, I am on the right track.

…when I break apart my application into bite-sized chunks, I lessen bugs, have shorter development life cycles, and allow collaborators to easily hop in and out of aiding with changes.

Feature branches have been popularized and standardized over the past 5 years. Simply put, they are a branches that are used to house and develop individual features. When using numerous feature branches, I am proving that I am properly segmenting my project into smaller parts. Similar to the concept of object-oriented programming, when I break apart my application into bite-sized chunks, I lessen bugs, have shorter development life cycles, and allow collaborators to easily hop in and out of aiding with changes. Merging branches become less dangerous and therefore less troublesome the smaller the feature.

Get A. Tate Barber’s stories in your inbox

Join Medium for free to get updates from this writer.

If you’d like to get more in-depth concerning git workflow and branches, checkout (no pun intended) git-flow.

Git Proves That I Get Shit Done (or Not)

When I was a young a sapling of a developer, I didn’t see the point in committing my code often (hence, my “Huge freaking commit!” messages). However, a few years later, I wish that I could say that I have committed code to any old repository at least every weekday. When you commit code, a feeling of accomplishment is experienced and that experience is actually recorded with a timestamp. Every day that I have not committed something is a day that I was not performing at my best and was being lazy.

Commit code often — even if it is a few lines. You will be a happier, more efficient, and better developer because of it. And let’s be honest, the better developer you are, the higher your salary will be.

When you commit code, a feeling of accomplishment is experienced and that experience is actually recorded with a timestamp.

This guy took a selfie every time he committed code and put together a time-lapse video.

Git Makes Me a Better Sysadmin

GUI tools like Tower or Atlassian’s Sourcetree are really helpful, however can hinder my learning curve. One of the best tips I have ever been given was from a supervisor at one of my first jobs. He advised me to never adopt a GUI tool until I knew what each button within the GUI did in the terminal. Specifically, this was about git and Sourcetree. Because I was depending on the GUI tool, I avoided the terminal commands, and as a result, I didn’t know how to use git.

Once I took my supervisors advice, I quickly learned how to use git and quickly became proficient. Thankfully, this principle can also be applied in other areas. For instance, I shouldn’t use “docker-compose” commands until I know how to use the raw “docker” commands.

Being comfortable in the terminal by using git allowed me to get a feel for man pages, help commands, filesystem navigation, and command parameters. These skills can then be applied to almost any command line tools.

Every day that I have not committed something is a day that I was not performing at my best and was being lazy.

--

--

A. Tate Barber
A. Tate Barber