Jakub Narebski <jnareb@xxxxxxxxx> writes: > So the question is: how to unpack branches, and how to prevent > branches from being packed by "git-gc"? I am afraid that is a wrong question. How long have we had the packed-refs anyway? The question is "How to get the list of refs from a Porcelain if it wants to be compatible with GIT v1.4.4-rc1 (Nov 7, 2006) and later?", and the answer is for-each-ref. Having said that, you could explode it by hand like this: git for-each-ref --format='%(objectname) %(refname)' refs/heads | while read sha1 refname do test -f "$GIT_DIR/$refname" || git update-ref "$refname" "$sha1" done - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html