Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.