I need to download the Facebook API from GitHub. Normally, I just click on the ‘Downloads” tab to download the latest source code. In this case, I need an older commit: 91f256424531030a454548693c3a6ca49ca3f35a, but I have no idea how to get the entire project from that commit…
Can someone please tell me how to do this?
(BTW, im on a mac. Don’t know if that makes any difference).
First, clone the repository using git, e.g. with:
That downloads the complete history of the repository, so you can switch to any version. Next, change into the newly cloned repository:
… and use
git checkout <COMMIT>to change to the right commit:That will give you a warning, since you’re no longer on a branch, and have switched directly to a particular version. (This is known as “detached HEAD” state.) Since it sounds as if you only want to use this SDK, rather than actively develop it, this isn’t something you need to worry about, unless you’re interested in finding out more about how git works.