There is a public project on GitHub. I need to download the version of the project, the publication of which was a month ago. Is it possible to get the source code of the old version of the project?
- commit version ac5de1421f45aff3566e850e0b4ab18ce01f629f - ExPande
|
2 answers
Clone the repository as usual,
git clone
<URI репозитория>
In the history (on the site, or using
git log
) find the commit or tag you need (in fact, a point in time) and go to it:git checkout
<хэш коммита или тег>
. In your case,git checkout ac5de142
(you can specify not a full hash, but only a unique part of it).(Optional) Do the
git checkout -b my-fork
branch and continue working.
|
If a known hash, then you just need to do git checkout тут_хеш
in the project folder. If there is no project in the folder, you need to merge it first with git clone
.
|