2. [Repositories] Introduction to Data Transformations4. Branching Your Code

4 - Branching your Code

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

📖 Task Introduction

Foundry repositories enable code branching and management with Git, which introduces structure and oversight to code changes. Among other features, this workflow permits branch protection so that, for instance, the code on your Master (i.e., "primary") branch can only be updated via approved pull requests.

This exercise will walk you through the process of switching to a feature branch where you can do your code development, and merging back into Master once ready.

🔨 Task Instructions

  1. To create a new branch, click the “Git branch” icon () just to the right of the branch name.
  2. Using the Create new branch window, create a new branch based on Master called yourName/feature/data_eng_tutorial_2. Then click the blue Create button in the bottom right of the window.
Protecting Branches

Users with the owner role on the repository can protect branches in a repository using the process described here. You most likely have the editor role on this repository, so this is not a required step in this training. It is, however, a best practice to protect master branches in a production repository.

You’ll be working with branches throughout this training track, but we strongly suggest reading through the following two Foundry documentation articles to prepare you for some of these workflows and to see best practices.