Skip to content

Instantly share code, notes, and snippets.

@maccevedor
Created October 30, 2014 14:23
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 maccevedor/9a29c43faf4dc1ab2e26 to your computer and use it in GitHub Desktop.
Save maccevedor/9a29c43faf4dc1ab2e26 to your computer and use it in GitHub Desktop.
Clone Commit
Github Tree View If the repo is in github, you can navigate to the tree view of the repo at https://github.com/<repo_name>/tree/<commit_sha> Then clicking on the Download ZIP button on the right-hand navigation bar will download the codes of that repo up to the specified commit.
Clone The Repo And Checkout The Specific Commit This will set the HEAD of your master to point to commit_sha. git clone -n <repo_name> git checkout <commit_sha>
Clone The Repo And Checkout The Specific Commit Into A Branch This will set the HEAD of your new_branch to point to commit_sha. git clone -n <repo_name> git checkout -b <new_branch> <commit_sha>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment