![git create branch after making changes git create branch after making changes](https://images.ctfassets.net/vtn4rfaw6n2j/5Zf5kRJrm1xvKzPbmpy3f0/64bcbca6ccdb00ae49446f216eed9bc3/image2.png)
This makes it possible to share a feature with other developers without touching any official code. In addition, feature branches can (and should) be pushed to the central repository. Git makes no technical distinction between the main branch and feature branches, so developers can edit, stage, and commit changes to a feature branch. The idea is to give a clear, highly-focused purpose to each branch. Feature branches should have descriptive names, like animated-menu-items or issue-#1061. Instead of committing directly on their local main branch, developers create a new branch every time they start work on a new feature.
![git create branch after making changes git create branch after making changes](https://i.stack.imgur.com/HZ8Wl.png)
The Feature Branch Workflow assumes a central repository, and main represents the official project history. The Gitflow, and Git Forking Workflows traditionally use a Git Feature Branch Workflow in regards to their branching models. The Git Feature Branch Workflow can be incorporated into other workflows. Git Feature Branch Workflow is branching model focused, meaning that it is a guiding framework for managing and creating branches. We discussed other Git workflows on the Git workflow overview page. The Git Feature Branch Workflow is a composable workflow that can be leveraged by other high-level Git workflows. The point is, pull requests make it incredibly easy for your team to comment on each other’s work. Or, if you get stuck in the middle of a feature, you can open a pull request asking for suggestions from your colleagues.
![git create branch after making changes git create branch after making changes](https://www.decodingdevops.com/wp-content/uploads/2018/10/create-a-branch-in-git.jpg)
They give other developers the opportunity to sign off on a feature before it gets integrated into the official project. It also means the main branch will never contain broken code, which is a huge advantage for continuous integration environments.Įncapsulating feature development also makes it possible to leverage pull requests, which are a way to initiate discussions around a branch. This encapsulation makes it easy for multiple developers to work on a particular feature without disturbing the main codebase. The core idea behind the Feature Branch Workflow is that all feature development should take place in a dedicated branch instead of the main branch.