How do you download a git hub project from a previous version to the last one?

1

How can you download an earlier version of GitHub from the project? Assuming it's a version that does not have an associated tag, for example, at some point in last week's story.

    
asked by Pablo Ezequiel 10.03.2017 в 03:49
source

3 answers

4

You can clone the repository and then run

git checkout <hash commit>

so you'll go to the commit you want, then you can create a branch based on that commit, for example

git checkout -b <nombre-rama>

or also after cloning you can do the following

git reset --hard <hash commit>

git-reset

    
answered by 10.03.2017 / 04:02
source
3

You can do it from Github this way:

  • You open the repository from the Github website.
  • You click on the commits of the repository. A list appears chronologically.
  • You search for the commit that interests you (for example, last week's). To the right of the commit row is the "Browse the repository at this point in the history" button. You click on it.
  • A list of files is displayed. The button on the right "Clone or download" allows you to download the files of this particular commit.
  • answered by 10.03.2017 в 04:00
    2

    If you want to download a version of a Git repository, just download the entire project. If you are under the control of Git versions, it means that you can go anywhere in the story.

    To go to a specific commit in a git repository:

    git checkout <sha1>
    

    where sha1 is the commit hash in both formats (short and long), an example would be:

    git checkout 97dd2ae065771908ee9ae0fa08ccdb58b5a6b18f
    

    The official documentation is Git-checkout

    You can also see other commands in this excellent Cheat Sheet

        
    answered by 10.03.2017 в 04:01