xxxxxxxxxx
# This will set the HEAD of your master to point to commit_sha.
git clone -n <repo_name>
git checkout <commit_sha>
xxxxxxxxxx
# make a new blank repository in the current directory
git init
# add a remote
git remote add origin url://to/source/repository
# fetch a commit (or branch or tag) of interest
# Note: the full history up to this commit will be retrieved unless
# you limit it with '--depth=...' or '--shallow-since=...'
git fetch origin <sha1-of-commit-of-interest>
# reset this repository's master branch to the commit of interest
git reset --hard FETCH_HEAD
xxxxxxxxxx
# 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>