I have a project under Git version control that I worked on both a server and my local computer. I originally had the remote origin set as my local computer but I would now
Based on the most upvoted answer, I created an alias to automate things:
Add to your .gitconfig
:
[alias]
unshallow = !"git fetch --unshallow \"${1:-origin}\" # Unshallow from remote $1 (defaults to origin)"
Usage:
git unshallow
# unshallow current branch based on the origin
remotegit unshallow other-remote
# unshallow current branch from remote other-remote