I have an Amazon EC2 machine. I would like to clone an older version of github repo on this machine. Normally I use git clone https://linktomyrepo.git How can I clone an older version, say an update from 14 days ago? I can see the exact version I need in the commit history of repository, but do not know how to clone it onto the EC2 machine. Do I need to use the little SHA code next to each commit?
You can always checkout any state you like by using a commit hash.
For instance, by looking a the log, you identified that 233ab4ef was the state you were interested in, issue a git checkout 233ab4ef
to checkout that state.
Another way to achieve this is by using git checkout @{14.days.ago}