Category: git

Git Tips & Tricks, Part 9–Find That Bug with Bisect!

Have you ever found a bug in your application, but been unable to find exactly *where* that bug was in your code?  Without this important bit of knowledge, it’s difficult to properly shame the developer that introduced the bug fix the bug.  It can be a bit like finding a needle in a haystack.   In…

Read More

Git Tips & Tricks, Part 8–See What’s Changed (again!)

I showed you one way that you can quickly see what’s changed back in Part 6 by comparing two commits.  You can also see what changed in a specific commit and fire up your git diff tool for each change.  I’ll show you how in this  post. [more] You can see a list of all…

Read More

Git Tips & Tricks, Part 7–Move Commits Between Branches with ‘cherry-pick’

One of my favorite git features is the ability to grab a commit and re-apply it on a different branch.  In this post, I’ll show you how to do this with the ‘cherry-pick’ command. [more] My team and I use a fairly standard git workflow.  Our master branch contains work that is actively under development. …

Read More

Git Tips & Tricks, Part 6–Quickly See What’s Changed

Today’s entry includes two tips for the price of one!  I’ll show you how to use git with Powershell to see all the files that changed between two commits.  I’ll also show you a quick and easy way to determine when a particular file was removed from source control. [more] First, let’s pretend that you…

Read More

Git Tips & Tricks, Part 5–Checking Your Commit for TODOs

Today’s simple tip will show you how to check for lingering “TODO” comments before you push your code up to your shared repository. [more] Have you ever dropped a TODO in your code to remind you to come back and refactor or clean something up later?  I’ll do that quite often when I’m hashing out…

Read More

Git Tips & Tricks, Part 4–Breaking a Commit Up

Today’s tip is pretty simple.  I’m going to show you how you can break up a commit into multiple, smaller commits after you’ve already committed everything to your local repo. [more] I’m a big advocate of peer reviews.  I always try to think about the poor sap lucky soul that gets to review my changes. …

Read More

Git Tips & Tricks, Part 3–Changing History with Rebase

In my last post, I alluded to combining commits before pushing them to the shared repository.  The magic command that can make that happen is “rebase,” and I’m going to show you how I use it every day. [more] What is Rebase? First, let’s get something out of the way: history cannot be changed.  That’s…

Read More

Git Tips & Tricks, Part 2–A Simple Workflow

Git’s flexibility allows you to use it however you want.  Your day-to-day workflow can be as complex or as simple as you decide to make it.   Here’s a “simple” workflow that my team and I use. [more] We have exactly two primary branches in our shared repository at any point in time: a release branch…

Read More

Git Tips & Tricks, Part 1–Tools

Git is great.  You should start using it immediately (if not sooner!)  In this new “Git Tips & Tricks” series, I’m not going to talk about the basic git operations that have already been covered by more talented people than me.  Instead, I’m going to show you all the Git commands and scripts I use…

Read More

Connecting TeamCity to Gitblit

This post is more of a reference for myself than anything else, but you might find it useful if you have run into security problems while trying to hook TeamCity to a Gitblit server that uses a self-signed certificate. [more] My team is slowly migrating to Gitblit from Subversion.  We’re big on Continuous Integration, so…

Read More