Working with branches
Branches in Git allow users to work on and develop new features of their projects without affecting or changing other branches in the repository. If you want to know more about branches check out the Version control & Git article.
In the example below, you can see how branches have been used to work on developing an ARC in parallel. The ARC is created within the “main” branch and some metadata and microscopy images are uploaded. A new branch called “plant material” is generated to describe the process of growing the plants, later used in the experimental assays, in a study. Moreover, another branch named “RNA-seq” deals with the description of the actual sequencing assay and the data generated from it. After completion, branches are merged into “main”.
ARCitect
Section titled ARCitectIn ARCitect you can create a new branch or switch to already existing ones by navigating to “Commit” on the left sidebar (1), then clicking on the dropdown menu (2) and selecting “Add Branch” (3) or the name of an already existing branch respectively (4).
ARC Commander
Section titled ARC CommanderChallenge
Section titled Challenge- No direct access rights to the main branch (which can be handled via the DataHUB) or
- Many people working on the same repository, making direct pushing to main branch chaotic.
Solution
Section titled SolutionWork on a second branch and contribute to the main branch using merge/pull requests
Workflow
Section titled Workflow- Use
arc get
to get the main branch of the repository. - Work on the ARC.
- Use
arc sync -b SecondBranchName
.
Git status
Section titled Git statusYou can check which branch you are currently working on and the status of this branch by using