search

Home  >  Q&A  >  body text

github - Can I git clone the latest version of a certain branch of a library? Just like downloading a certain branch in the browser?

There is an open source project odoo, which currently has more than 10 branches (versions), and the entire library is very large when cloned.
I know and tried to clone -b a branch, but I found that this branch is also very large;
We know that when downloading on the web page, select the branch, which is usually the latest version of the branch, and there is no historical version .
Does anyone know what options can be achieved using git clone?
Thank you!

ringa_leeringa_lee2785 days ago600

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-02 09:34:37

    git init a local warehouse
    Set upstream’s remote address
    git fetch origin/branch1 --depth=1
    That’s about it

    reply
    0
  • Cancelreply