# 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
# in the source repository, create a tag against the commit you want to check out
git tag -m "Temporary tag" tmptag <sha1>
# create a new directory and change into that directory
cd somewhere_else;mkdir newdir;cd newdir
# ...and create a new repository
git init
# add the source repository as a remote (this can be a URL or a directory)
git remote add origin /path/to/original/repo
# fetch the tag, which will include the entire repo and history up to that point
git fetch origin refs/tags/tmptag
# reset the head of the repository
git reset --hard FETCH_HEAD
# you can now change back to the original repository and remove the temporary tag
cd original_repo
git tag -d tmptag
# clone special tag/branch without history
git clone --branch=<tag/branch> --depth=1 <repository>
# clone special revision with minimal histories
git clone --branch <branch> <repository> --shallow-since=yyyy-MM-ddTHH:mm:ss # get the commit time
cd <dir>
git reset --hard <revision>
#Create empty git repo
mkdir repo && cd repo && git init
#add remote, configure it to track <branch>
git remote add --no-tags -t <branch> -m <branch> origin <url>
#fetch objects from remote repo
git fetch --no-write-fetch-head
#examine commits and logs to decide which one we will use
git log --oneline origin
#Once you have found the commit of interest copy the abbreviated hash or save as variable
commit=<sha1>
#rename our default branch to match remote branch
git branch -m <branch>
#set branch head to desired commit
git branch <branch> $commit
#set remote branch as upstream for <branch>
git branch -u origin <branch>
#All done time to checkout
git checkout