Jeff Garzik wrote:
Tejun Heo wrote:
$ cat ~/bin/git-sync.sh
#!/bin/sh
if [ ! -r .git/origin ]; then
echo "not in git repo" 2>&1
exit 1
fi
rsync -avz --ignore-existing $(cat .git/origin)/ .git/
rsync -avz $(cat .git/origin)/refs/ .git/refs/
After syncing, you need to do 'git-read-tree -m upstream'
'git-checkout-cache -q -f -u -a'
In the fast-moving world of git, this is a bit outdated. You should use
git checkout -f upstream
to check out a specific branch.
Oh.. there was the '-f' switch. I always hit 'xxx changed' message
without the option and have gotten into the habit of using
read-tree/checkout-cache after a while. Thanks for the tip.
--
tejun
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html