Git checkout revision of local repository

I have a local git repository for an Xcode project. How do I checkout (from Terminal) a specific revision of the project to a different folder?

Thanks.


You can clone a local repo into another folder:

  • clone a specific branch:

    git clone -b my-branch /path/to/local/repo /path/to/new/repo
    
  • clone a specific tag:

    git clone -b aTag /path/to/local/repo /path/to/new/repo
    
  • 链接地址: http://www.djcxy.com/p/16042.html

    上一篇: 防止git推到错误的远程

    下一篇: 本地存储库的Git签出版本