Is there an efficient method to quickly download multiple branches of an app?

0
Our team creates a feature branch for each task, which means multiple peer reviews and branches often accumulate. I need to switch between branches frequently, and the time spent downloading and switching branches adds up. I had built a Python script that lists available branches and downloads multiple branches in parallel based on the local Git configuration of the master branch. However, the downloads don't include Git metadata, so the branches come through as unversioned copies. This means I can't make or commit changes to them, which defeats the purpose.I'm curious if anyone has established working methods for downloading and managing multiple branches efficiently while keeping them Git-enabled and allow for commits.
asked
1 answers
2

Since this is a Mendix Git repository, you can avoid downloading branches as plain copies by cloning the repository with Git metadata included.


Instead of copying the branch files, use a proper Git clone:

git clone --branch BRANCH_NAME --single-branch https://pat:YOUR_PAT@git.api.mendix.com/APP_ID.git


This keeps the Git information, so the branch remains a real Git repository and you can continue to commit, pull, and push changes.


For multiple branches, you can automate this command and create separate clones per branch. Each clone will still contain the .git metadata and behave like a normal Mendix Git project.


Kindly mark this as the accepted answer if it helps.

answered