Over the years, I've both written and spoken about Git in articles, presentations, workshops or by answering questions on Stack Overflow.
In more than one occasion, I've found myself wanting to link to one of those resources but not being able to find it. This page is an attempt to group everything together in a single place to make it easier to reference in the future. I hope you find it useful.
I made a rule for myself that every time I learn a new peculiar thing about Git, I write it down. Every once in a while, I'll come across something that really needs explaining, so I'll write an article about it. Here are the links to my Git notes so far.
When using a Trunk-based development workflow, the standard git pull
command is going to clutter your history with a bunch of merge commits, simply due to the asynchronous nature of collaboration. Fortunately, there’s a somewhat obscure way to make things right.
Continue reading ↦
Your repository has more commits than what meets the eye. They hide somewhere in the .git
directory — where you can’t see them — but they’re there. I call them the invisible commits.
Knowing where to find them, can sometimes mean the difference between being able to recover your work and losing it to the sands of time.
Continue reading ↦
Regardless of how you choose to track your history, one of the things you often want to know is which commits are in what branch. Sounds easy enough, right? And yet, you wouldn't believe just how cumbersome certain version control systems make answering such a simple question. What I think you'll find even harder to believe, however, is the fact that with Git it's as easy as pie. Continue reading ↦
Tell me if you recognize this scenario: you’re in the middle of rewriting your local commits when you suddenly realize that you have gone too far and, after one too many rebases, you are left with a history that looks nothing like the way you wanted. No? Well, I certainly do. It was in one of those moments of despair that I finally decided to set out to create my own git undo command. Here’s what I came up with and how I got there.
Continue reading ↦
Since the dawn of civilization, common sense has taught us that the way forward starts by knowing how we got here in the first place. While this powerful principle applies to practically all aspects of life, it’s especially true when developing software. For us programmers, the rear mirror through which we look at the history of a code base before we go on to shape its future is version control. Among all the information captured by a version control tool, the most critical ones are the commit messages.
Continue reading ↦
When I first started getting into Git a couple of years ago, one of the things I found most frustrating about the learning experience was the complete lack of guidance on how to interpret the myriad of commands and switches found in the documentation. What I was looking for, was a way to represent the state of a Git repository in some sort of graphical format. In my mind, if only I could have visualized how the different combinations of commands and switches impacted my repo, I would have had a much better shot at actually understand their meaning.
Continue reading ↦
Sometimes, I have more things to say than can fit in an article or a presentation. That's when I make a course instead. However, those take longer so there are fewer of them. In any case, rest assured that every time I publish a new one, you'll find a link for it here.
A selection of some of my most popular presentations about Git from recent years. I linked to the slides and demo material as they were available. If a talk was recorded, I made sure to include a link to the video as well. For my other presentations, check out my speaking page.
Here's some of the feedback I received from people who watched my Pluralsight courses or attended one of my presentations:
— Maja GaćicaWhat a course!! https://www.pluralsight.com/courses/git-advanced-tips-tricks This will really take your Git workflow to another level. Thanks and enormous kudos to @ecampidoglio!!
— Igal Tabachnik"Advanced Git tips and Tricks" by @ecampidoglio course on Pluralsight is paying for itself. So much good info there!
— Alex PovarYour passion to Git and level of knowledge inspires me to learn it too :) BTW, thanks for the great Pluralsight course about Git - it's awesome. Started to use some tricks like
commit --fixup
orrebase --whitespace=fix
- real life saver.
— José Pedro Dias@ecampidoglio I'm really enjoying your "Advanced Git Tips and Tricks" Pluralsight course. Well explained & very useful!
— Mark Seemann"The things Git can do that none of the GUIs ever told you about" with @ecampidoglio was easily the best #techorama session yet!
— Thomas DarvikReally great talk from @ecampidoglio at NDC Oslo on Git. First time I've actually understood "low level" git-stuff.
— Mat McLoughlinEnrico’s Git talks are always brilliant. Highly recommend you check him out.
If you'd like me to speak at your company or event, you can find more information on the contact page.