Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1013 Bytes

create-a-branch.md

File metadata and controls

55 lines (33 loc) · 1013 Bytes

Exercise: Create a branch

0. Setup a new branch & configure base

0.1 Create a new branch

Make sure you are on your own branch, otherwise follow the next step.

Create your branch

You can use the following pattern: {your-branch-name}

git checkout -b {your-branch-name}

0.2 Configure defaultBase

Nx needs a base branch to compare changes again. We now pretend that your personal branch will be the new main now.

For this we need to configure the defaultBase to be the branch you are currently working in the nx.json file.

Adjust `defaultBase`
// nx.json

{
  "defaultBase": "", // 👈️ the branch you are working on, e.g. solutions/hey-its-mario
}

0.3 Commit & Push

In case you haven't committed anything yet. Please do so now!

git commit -a -m "this is everything from me"

And also push your changes to the remote.

git push