Skip to content

Instantly share code, notes, and snippets.

@sreejithbnaick
Created July 24, 2021 08:34
Show Gist options
  • Select an option

  • Save sreejithbnaick/07794c6488d6754acfd2b4bd7b85eded to your computer and use it in GitHub Desktop.

Select an option

Save sreejithbnaick/07794c6488d6754acfd2b4bd7b85eded to your computer and use it in GitHub Desktop.
Fetch all remote branches after shallow clone
git clone <remote-url> --branch <branch-name> --depth 1
git config remote.origin.fetch
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git remote update
git fetch --unshallow
or
git fetch --depth 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment