New branch in git

Verze:

23. 05. 2022

Zodpovědná osoba:

Dominik Šlechta

How to create a branch

In smartgit 2 click on the branch you want to start from (usually the master)
Or use right click > checkout

Mark the commit in the working tree from which we want to start (usually the latest commit)

Click on Branch > Add Branch at the top

Name the branch by task in a sensible way - taskId-add_to_cart, -basket, -product_modal, -categories, etc.

Choose create and checkout and we will automatically switch to the new branch - it is visible in the list of local and origin branches (checked arrow and bold text) or in the list of projects in the bracket of the project.

It's always important to have a pull and commit (or push) when changing a branch, and it's a good idea to turn off file compilation.