Git
Git is one of the leading distributed version control systems. Originally developed by Linus Torvalds to manage the source code of the Linux kernel, it quickly become the default version control system for most of the software world.
-
Configuring Git
When starting to use Git on a new computer there are several steps that I always take before I start work. They make life a little easier when working with Git in a terminal.
Articles on Git
-
Finding bugs with git bisect
When a bug has crept in to your code that you're having trouble fixing, it helps to know when it was introduced. If you can prove which code caused the bug you can normally work out why. The
git bisect
command is here to help you track it down... -
Move commits from one branch to another
Have you ever made a few commits on a branch, only to later realise that you should have been working on a topic branch (i.e. a branch specific to the task you're working on)? So long as you haven't yet shared any of these commits with anybody else, you can easily move them on to a new branch, and then remove them from your current branch.
-
Quickly applying GitHub pull requests
Applying GitHub pull requests can be very easy if the patch is obviously good -- you just click the green "Merge pull request" button and get on with your day. If you need to get the code into a local repository before you can push it up to your project's master branch (as I always do) things are a little more involved. But we can speed the process up...
-
Swapping two files in git
I found myself wanting to swap the names of two files in my Git repository, and couldn't find an easy way to do it with the
git
command. So I extended it. Now I just typegit swap file1 file2
to rename the two files to each other. -
Making gitk look good on Mac OS X
Does your version of
gitk
look like Windows 95's ugly step sister? Would you rather it used native buttons and widgets, and a half decent font? -
Easy git-svn for Rails (or "git-me-up")
I've been trying to persuade
git-svn
to work properly with Rails plugins that are installed viasvn:externals
. Whilst working out how to do it I stumbled across several great articles, but I couldn't get any of the solutions presented to work perfectly.After a bit of head scratching I got it sorted, and wrapped the process up in a little utility called git-me-up.
-
Recovering Lost Commits with git reflog and reset
When I first setup this blog I took the opportunity to try out Git, and imported the source of the blogging software into a Git repository. The thinking was that if I needed to patch the blog software that I'd have a fairly trouble free upgrade path, merging the upstream changes straight into my branch.
All went well until, after several hours of work, I lost everything...