Gigantum Projects and Datasets use Git under the hood to track changes and support concurrent work. As such, Gigantum supports the various branch capabilities: create, delete, checkout, and merge.
Branches for Projects contain the entire project state - including environment and data. You can change the environment, delete, add or alter files without worrying that it will interfere with other branches.
To create a branch, click the "Create" icon under the Project title. A prompt will open for you to give a name to this branch.
Once this operation completes, your current active branch will become the new branch. To see, notice the branch menu at the top is no longer master. Here, I created a new branch called "my-example-branch"
A branch change performs a Git checkout operation. This updates your working copy of code, data and environment configurations.
To perform a change of branch, select the branch from the branch menu at the top left. Selecting the appropriate branch you wish to change to will change branches. For branches that are quite different or large projects, this operation might take some time.
To delete a branch, first click the "Manage" button on the branch menu. A menu on the right will fly out with an list of all branches, as well as a series of actions that can be performed on them.
To delete, simply then press the trash icon.
Note that the "master" branch may not be deleted.
Merging is used to combine the contents and histories of two branches. When merging, you always are "pulling" content from a different branch into the branch that you currently are on.
To merge in the history and content of another branch, first click the "Manage" button on the branch menu at the top to bring out the branching detail menu on the right side of the screen. Then, click the "merge" button on the branch you which to merge from (i.e., the branch whose changes you want to pull in to your current branch).
In the screenshot above, this merges the content of
my-example-branch into master, which is the current active branch.
When merging two branches, there is always a chance for a conflict that cannot be resolved automatically. A conflict is when two changes are made to the same part of a file in two different branches, and Git cannot infer which change is the correct one.
When conflicts occur, the user is presented with three options:
- Resolve conflicts using "mine" -- i.e., give the changes introduced in the current branch priority.
- Resolve conflicts using "theirs" -- i.e., give the changes in the other branch priority.
- Abort -- cancel the merge.
Updated about 2 years ago