> For the complete documentation index, see [llms.txt](https://johnoraw.gitbook.io/iac-version-control/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://johnoraw.gitbook.io/iac-version-control/github/larger-projects/creating-a-feature-branch.md).

# Creating a Feature Branch

As discussed in the theory notes, we should be doing commits on code changes on dedicated feature branches. When they are looking good, we can merge them to **dev** or **test**.&#x20;

I am going to add initial pages to my repo. This time, I’m going to use an option -b to create and change branches in a single command.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/R3iYseVFos1aeWJs85AL/image.png" alt=""><figcaption></figcaption></figure>

And I verify I am on the right branch.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/RAJ6qq7D23g0x9MfsOes/image.png" alt=""><figcaption></figcaption></figure>

Next, I add in some files, and test them to ensure they basically work. After, I check where I am with **git status**.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/4AxDQ6PI3PR3liDNzN7j/image.png" alt=""><figcaption></figcaption></figure>

I stage and commit these files to the **initial\_pages** branch.&#x20;

If I have done something stupid and broken the application, it doesn’t matter! The permanent branches, main, test and dev do not utilize this new code, it is only on the specific feature branch.

<figure><img src="https://content.gitbook.com/content/C1tv1gDCmQOVxTprzQP4/blobs/eDZ6M3v1taENqvHBNygi/image.png" alt=""><figcaption></figcaption></figure>
