I am tracking several remote heads, and I regularly want to fetch them all, then look at where I am in relation to all these using qgit (or gitk if I’m feel like I prefer the old skool styling that day).
git-fetch on its own jus t fetches from the origin. What I want is git-fetch –all but this isn’t an option. Here’s how:
[bash]
cd /path/to/your/repo/git/refs/remotes/
for r in * ; do git fetch “$r” ; done
cd -
[/bash]
I’ve wrapped this up in a script to automate it. Seems odd that it’s not a function in git, but then again I’m quite new to git and so maybe there’s something I’m missing!
Tags: git, version control