What We’ve Learned From Coaching DevOps Teams in Git Branching Strategies

Version control is fundamental to DevOps, so using it becomes second nature for DevOps teams. But the choices teams made when setting up their workflow, and the reasons for those choices, get forgotten and are rarely revisited.

Gearset operates in an ecosystem where many development teams are still adopting DevOps. As a result, we spend a fair amount of time helping teams move from manual deployments and slow release cadences to a mature DevOps process. Even though their priorities and challenges vary, teams in small startups and large enterprises alike are all looking for the same thing: the agility that comes from DevOps.

How Do You Delete a Local Branch in Git?

At its core, the branching model offered by Git is intended to help you avoid merging unstable code into the main codebase. Working with branches in Git is a breeze, especially if you’re working with the GitKraken Git client to visualize your repository.

How to Delete a Git Branch Locally Using the Command Line

To delete a local branch in Git using the terminal, you’re going to run the git branch command and pass in the -d flag. Next, you will pass in the name of the branch you wish to delete.

Git branch naming conventions

We use git branches at DeepSource to organize ongoing work to ensure that software delivery stays effective. If you use git today, there are high chances that you're either using the famed git-flow or the more recent GitHub flow. Both these workflows depend extensively on using branches effectively — and naming a new branch is something many developers struggle with.

A consistent branch naming convention is part of code review best practices, and can make life much more easier for anyone who’s collaborating and reviewing your code, in addition to using static analysis tools.

The Essentials of GitOps

GitOps is an operational framework that leverages DevOps core practices used in application development, including version control, CI/CD, and collaboration, for infrastructure automation. This Refcard introduces the fundamentals of a mature GitOps model, the key benefits of GitOps, and the elements of a GitOps workflow for new feature deployment.