mani icon indicating copy to clipboard operation
mani copied to clipboard

How do I choose which branch I want to pull?

Open swatchgame opened this issue 2 years ago • 1 comments

I want to pull different branches for different projects, but even if I change the env value in the mani.yaml file, it still pulls the master or main branch by default when I do a mani sync.

projects:
  example:
    path: .

  pinto:
    path: frontend/pinto
    url: https://github.com/alajmo/pinto
    tags: [frontend]
    env:
      branch: feat/switch-ui

  dashgrid:
    path: frontend/dashgrid/../dashgrid
    url: https://github.com/alajmo/dashgrid
    tags: [frontend, misc]

  template-generator:
    url: https://github.com/alajmo/template-generator
    tags: [cli]
    env:
      branch: feat-replace

For pinto and template-generator, both projects still pull the main and master branches.

swatchgame avatar Jul 18 '23 03:07 swatchgame

There's no flag for specific git commands, but you can override it easily:

projects:
  pinto:
    path: frontend/pinto
    url: https://github.com/alajmo/pinto
    clone: git clone ${MANI_PROJECT_URL} --branch feat/switch-ui

  dashgrid:
    path: frontend/dashgrid/../dashgrid
    url: https://github.com/alajmo/dashgrid
    clone: git clone ${MANI_PROJECT_URL} --branch main

  template-generator:
    url: https://github.com/alajmo/template-generator
    clone: git clone ${MANI_PROJECT_URL} --branch feat-replace

I might add some standard git options later on.

alajmo avatar Jul 18 '23 06:07 alajmo