threads / discuss / 1032

git-pull-branch script

Subject: git-pull-branch script

## tl;dr

One message between Jun 27, 2005 and Jun 27, 2005.

replies: 0people: 1as markdown or json

Jeff Garzik· Jun 27, 2005, 12:27 UTC · lore

I've attached the 1-line git-pull-branch script that I just whipped together, in case anybody finds it useful.

On occasion, I need to pull one branch into another branch, inside the same repo. For this case, the objects are already present, so we can skip the git-fetch-script step of git-pull-script completely. I also modify the commit message so that we log the fact that we pulled a branch.

#!/bin/sh
git-resolve-script HEAD $1 "`pwd` branch '$1'"

← back to recent threads