Skip to content

Instantly share code, notes, and snippets.

@askagirl
Forked from fernandoaleman/clone-git-repo.txt
Created November 27, 2019 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save askagirl/57b28ee546c21baeec1c9e83ddd2b15d to your computer and use it in GitHub Desktop.
Save askagirl/57b28ee546c21baeec1c9e83ddd2b15d to your computer and use it in GitHub Desktop.
How to clone git repo with all branches and tags
# Clone repo
git clone --mirror git@github.com/fernandoaleman/app.git app/.git
# Change into app directory
cd app
# Update git config
git config --unset core.bare
# Checkout master branch
git checkout master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment