Skip to content

Instantly share code, notes, and snippets.

@jekkilekki
Created October 21, 2016 02:06
Show Gist options
  • Save jekkilekki/6385c8654766f95da03ef5b13aab8fd5 to your computer and use it in GitHub Desktop.
Save jekkilekki/6385c8654766f95da03ef5b13aab8fd5 to your computer and use it in GitHub Desktop.
Clone ALL branches of a git repo
# From Ray Villalobos' course on AngularJS2
# @link https://www.lynda.com/AngularJS-tutorials/Using-exercises-course/428058/482931-4.html
git clone --bare https://github.com/path/to/repo.git .git # Clones a bare version of the repo
git config --bool core.bare false # Switch bare repo to normal version of the repo
git reset --hard # Repo resets to the master branch at the latest commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment