How to clone a specific version of a git repository?

前端 未结 3 559
悲哀的现实
悲哀的现实 2021-01-03 03:59

I\'m working with symfony2 and I want to backup my vendors in case github is not reachable.

How do I clone a specific Version of a repository?

I want to back

3条回答
  •  生来不讨喜
    2021-01-03 04:43

    What I would do to tell git to use this exact version is:

    git clone http://github.com/symfony/symfony.git
    cd symfony
    
    git checkout v2.0.9
    

    One liner:

    git clone http://github.com/symfony/symfony.git -b v2.0.9
    

提交回复
热议问题