#!/usr/bin/env bash unshallow-git-folder(){ echo "Fetch with unshallow..." git fetch --unshallow echo "Fix origin fetch config." git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" echo "Now pull and checkout remote branches." } ugf() { unshallow-git-folder "$@" }