Professional Git with Brent Laster

Professional Git - Brent Laster

Professional Git – Brent Laster

This week I sit down with Brent Laster, author of “Professional Git.” 

Full Transcript

[background music]

Michael Carducci:

You’re listening to the “No Fluff Just Stuff,” podcast, the JVM Conference series with dozens of dates around the country. There’ll be one near you. Check out our tour dates at nofluffjuststuff.com.

Hey everybody, this is your host, Michael Carducci. This week I’m talking Git with Brent Laster. Brent is a software engineer extraordinaire, speaker, trainer. We’ve seen a lot of him on the No Fluff Just Stuff tour.

He talks and trains in-depth on not only in Git and source control, but continuous delivery concepts, and a variety of different topics. He’s just published his book, “Professional Git,” by Brent Laster. It’s available on Amazon. We sat down to dive deep and talk all things Git, and even Girl Scout Cookies. Enjoy the podcast.

[music]

Michael:

I’m joined here with Brent Laster. I had the privilege of sharing the stage, as it were, at ArchComf in Clearwater, Florida, so it’s great to be able to sit down and talk again. Why don’t you say hello and tell us just a little bit about yourself?

Brent Laster:

Thanks, Michael. Thanks for having me on here. As you said we’ve shared a stage before. It’s great to talk with you again. The book that I wrote is called Professional Git. Many people may be wondering why get another Git book. We’ve tried to do some things here to differentiate this one.

We wanted a way to have a book out there that people could pick up from the beginner to the advanced Git user and get value out of. We have included some things like hands-on labs for people to get up and running quickly with Git, and to internalize it as well as advanced techniques for the advanced users who will find something in here as well.

Michael:

In your opinion, certainly I think a lot of people have seen the light as it were, do you think there’s anything just off the top of your head, having gone through the in-depth process, to put a book together like this? Do you think there is anything that we’re missing right now that there’s some kind of hidden gems in the Git world or maybe some things that you see a lot of people doing wrong?

Brent:

That’s an interesting point. This book was developed out of the years of me doing classes and teaching Git, both in the corporate world and in conferences like No Fluff Just Stuff series, as well.

One of the things I’ve encountered is a lot of the same kinds of questions that come up and issues that people run into from starting to use Git or even advanced users. We try to incorporate those into the book to try to answer some of the questions in advance, because I’ve done the teaching before, I know what to anticipate with that.

There definitely is still a mind shift, even though, as you say, people have seen the light with Git, started using it. There’s definitely a mind shift to using it, and it’s definitely better to have some kind of a guide to help go through, and to help avoid those kinds of pitfalls.

Michael:

Yeah, that’s certainly one of the things that stuck out to me when I was looking at the book itself, and the way that it’s structured. It really is almost structured like a Git master class, the way that each section builds on from the other. Looking at it as well, you don’t have to go through it in a linear fashion. It’s structured well enough that you can dive right in and start reading about hooks…?

Brent:

Right. I tried to, when I was putting this together, figure out how I can make it both useful for beginners and useful for the advanced users out there that have been using it for a while. A lot of the chapters will have things like advanced technique sections in them which then say, “OK, you already know some of this stuff, but here’s some advanced techniques you may not know how to do.”

For example, creating aliases with parameters to do advanced things in there. I also try to make it a little more appealing to people from doing a lot of different backgrounds out there. For example, in the Hooks section, one of the things I’ve done is to include example programs written in Groovy, Ruby, Perl, Python, with shell, that give a wide examples of different things, different ways you can write hooks with Git.

Michael:

One of the things I’m curious about, having as much of an in-depth understanding of Git as you must to have done all this training, and to have written this book, for you, what are some of the highlights, some of the game changers, that you’re still excited about, a few years in?

Brent:

They keep adding new functionality to Git. A few years back, when I would go to conferences like the No Fluff Just Stuff and such, I would do introductory Git classes. Now, introductory Git classes, nobody really is as interested in them.

They want to learn more about the new stuff and the advanced techniques for it. I did a session at this time at the conference, called “Power Git,” where we worked through some of the newer things in Git, such as the working trees, which allows you to have multiple working directories tied to the same repository and sub-trees which allow you to have projects of sub-directories as an alternative to sub-modules.

It’s nice that the Git community keeps advancing the product and keeps adding new things and adding more powerful features. That’s another reason. There have been changes since some of the Git books were written. In this book, I try to bring in the latest and greatest stuff and also point that out where it’s appropriate.

Michael:

That’s pretty exciting definitely that you’ve got up to the minute information on that. One of the things that I think about when I think of Git and certainly my transition to Git is, maybe this is something we can all relate to having been in a situation where we’ve done something wrong, having that lack of depth in my Git education for a long time, there was one particular website that I had on a permanent bookmark. It was ohshitgit.com.

I don’t know if you’ve been familiar with this, kind of a quick reference of how to get out of different situations that the authors found himself, him or herself in. Here are some bad situations. I’ve got myself into and how I eventually got myself out of them in plain English.

That really does speak to some of the challenges people have with Git. There are these pitfalls and some of these shifts of thinking.

Brent:

Git, I’ve said this in conferences and all my classes, is a mind shift. What I mean by that is it really does require thinking about it in a different way. Probably the number one mistake that most users make going to Git is they try to map it exactly to what they’ve done before, to a Subversion or a CVS, or something like that. It’s different. It’s different enough that trying to do that can sometimes get you into trouble.

In the book, I try to point out, “Here are things to think about before you migrate how you’re going to structure your repositories, how many users you’ll have, you won’t encounter many of the merge issues in there for each repository, what a repository means.” We start out with a pretty basic analogy of a dev test prod environment to the different layers of Git.

To your point, it’s a mind shift. If people just go at it from the standpoint of let me just find out what I have to do to push files out the same way that I used to commit files in CVS or something, they’re going to get caught in some of those traps. We try to make this also a guide to help people not hit those same pitfalls.

Michael:

The other thing that really struck out to me is that you do seem to speak to all audiences. If somebody’s a beginner, certainly you’ve covered that, if somebody’s a fairly seasoned developer, there’s a lot of in-depth, and latest and greatest which you’ve mentioned. Also, if somebody’s in a change manage, configuration management kind of role, almost like an operations type role, do you want to speak to them a little bit?

Brent:

Sure. In the course of doing the corporate classes especially, I’ve had people come in who said, “I’m a manager,” or, “I’m a project manager,” or somebody who’s not necessarily in a development role full-time. They know that their teams are using Git, and they know they need to understand enough about it.

I try to make, I think the first three chapters of this, as the first part of the book, as something that the non-developers could read and digest and understand enough about Git so they could understand basically what their development counterparts were talking about.

That’s one of things that we don’t want to just tailor our education, training, and stuff to the development role. We want to be able to help people who are in those non-development roles, but say, “I don’t Git’s the industry standard now. I know I need to learn about it. I need something to help me guide that.”

The first few chapters of the book are targeted at that kind of an audience as well as developers to give them a good background in it. The non-development folks can get a lot out of those first few chapters just by reading those.

Michael:

One other area that’s close to my heart as it were is continuous delivery. I imagine when you talk about promotion models and different branching techniques, does any of that overlap?

Brent:

Absolutely. Git is certainly, again, the industry standard in terms of a lot of continuous delivery models. One of the sessions that I’ve taught quite a bit is a continuous delivery developing with Jenkins. We use Git in that.

It’s hard not to talk about Git without talking about source management you’re intending to use for continuous delivery out there. Certainly there’re some overlap in there. Certainly things like the branching models in there is designed to help users understand how they might structure some of their branches for continuous delivery situations.

Michael:

One other thing, certainly something I need to compliment you on explaining a lot of these things in plain English and introducing these concepts and where we do need to shift our thinking.

Brent:

I appreciate that. It’s XKCD, the comic there. There’s a couple of folks using Git at the keyboard. One is explaining to the other how this is Git and it’s going to solve all our problems and everything. The guide person asks, “How do you use it?” It’s like, “I have no idea.”

Michael:

[laughs] Just memorize these commands.

Brent:

Memorize these commands, go get a friend or something who knows it, and do it in there. It was an interesting challenge writing the book to figure out how to put this in straightforward terms but not also just make it so simplistic that people wouldn’t be interested in it.

Certainly, what I’ve tried to do is present the Git concepts and then present analogies to them and do things, like with the labs, that allow people to get in there. That’s one the points I really wanted. I told the editor I wanted to put the labs in there because I want to get people a chance to practice in a safe environment, in your own safe environment.

Michael:

That actually going to be my next comment, the fact that you’ve got the labs in there. I feel like that’s something that’s missing in so many technical books that it’s, “Hey, here’s how you do this, here’s how you do that,” and then we jump right into doing that in production or wherever else. There isn’t that safe environment.

Among the many, many, many, many, many numerous downfall of Hitler parody videos — I’m sure you’ve seen it — Hitler uses Git. Everything goes downhill.

Brent:

Right up there with the Girl Scout Cookie one.

Michael:

[laughs] Where they’re out of thin mints.

Brent:

They’re out of thin mints, I think, yeah.

Michael:

One of the things I’ve learned recently, I travel now so much, that Girl Scout Cookies actually have different names in different parts of the country.

Brent:

I didn’t know that.

Michael:

My particular favorite Girl Scout Cookie, now we’re going on a WildTangent, is in some parts of the country a samoa or samoan. In Texas and in the South and in some parts of the country, they’re called caramel delights.

Brent:

Sounds impressive.

Michael:

I didn’t know this, and I asked the Girl Scout. I was going to the grocery store, and I got stopped, and the Girl Scout asked me if I wanted to buy some cookies. I said, “Do I look like a man who needs to buy some cookies?”

She said, “Yes!” I applaud her honesty. I asked if they had any samoans. She says, “No.” “How do you not have those?” That’s the number one. Thin mints, too, I go through those by the sleeve.

Brent:

Me, too.

Michael:

One pro tip with the thin mints by the way, I like to keep them in the freezer.

Brent:

I do, too.

Michael:

That’s one more little holiday Girl Scout Cookie secret although we’re a little ways away from Girl Scout Cookie season.

Going back to that safe environment to actually go and play around with these things, because there’s a reality in what we do. The reality is that we learn by doing.

Brent:

That’s what I found out more in the labs, too. Sorry, my dog is going crazy at the moment.

We learn by doing, and the hands on labs gives you a chance to practice and to make mistakes in there. Although hopefully with labs, they’re pretty much handheld so that you don’t make mistakes in there. It’s a good environment.

I have always believed that no matter how good the text or how good the presentation or whatever, you really learn by internalizing it and by doing it yourself. I know there’re different modes of learning, the kinesthetic, the auditory individuals, so forth, but you get the information and you take it in.

Once you actually have an opportunity to put it in practice, that’s when I think it really gels for most people in there. We wanted to include the labs in there to make sure that people could really have this gel and could get the value they need from the book.

Michael:

It’s out now. Wiley published this. Is that correct?

Brent:

Yeah, it’s John Wiley & Sons. Their technical branch is Wrox, W-R-O-X, but it’s on Amazon. You can get it for a very good deal. It was 42 percent off or something on Amazon right now.

Michael:

That’s a steal.

Brent:

It’s out there. It’s available. The Kindle edition’s available, too. People are interested in that. It’s out there. We hope it provides some value for people.

Michael:

One more thing that I thought was really great is, I’m seeing this more and more with technical books now, which is phenomenal, that you can actually download all the code. All the code is available for download as well to go and put your hands on instead of here’s the code. If you want to type it up and then, wait, where did I make a mistake?

Brent:

Absolutely. That was one of the things that the folks at Wiley worked with me on. They said, “We definitely want to get your code out there on GitHub.” There’s information in the book about where to go out to GitHub.

The hook examples are probably the big ones out there, the Groovy, Ruby, Perl, Python, those kinds of things out there. They’re all out on GitHub. People can download them and go from there.

Michael:

Do check this out on Amazon. Professional Git by Brent Laster.

[background music]

Michael:

Brent, thank you for joining us.

Brent:

Thank you, Mike, for having me. I appreciate it. I appreciate the opportunity.

Michael:

At No Fluff Just Stuff, we bring the best technologists to you on a road show format. Early bird discounts are available for the season. Check out the entire show lineup and tour dates at nofluffjuststuff.com. I’m your host, Michael Carducci. Thanks for listening and stay subscribed.

 

Leave a Reply

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

*