You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesi贸n a prueba de IA

Antes: $249

Currency
$209
Suscr铆bete

Termina en:

0 D铆as
14 Hrs
50 Min
47 Seg

Tipos de Release y Estrategias de Ramificaci贸n

3/17
Resources

Efficient code management is critical to the success of any development project. When there is no clear branching strategy, teams can face chaos, bugs in production and difficulties in reverting problematic changes. In this content we will explore how to implement methodologies such as Gitflow and Trunk-based Development to maintain effective control over every update to your software, integrating tools such as GitHub and Jira to streamline workflow.

Why is it crucial to implement a branching strategy?

Without a well-defined branching strategy, software development can quickly devolve into chaos. Common problems include:

  • Errors reaching production without proper control.
  • Difficulty reversing changes when something goes wrong.
  • Disorganization in the development team.

To avoid these problems, each release should have its own branch and follow a clearly structured workflow. The most commonly used methodologies to achieve this are Gitflow and Trunk-based Development, each with its own characteristics and use cases.

How does Gitflow work and when to use it?

Gitflow is a widely adopted branching methodology, especially in companies with large development teams. Its main feature is the creation of a separate branch for each issue or task.

In this structure:

  • The main development branch is develop.
  • Each new feature or fix is part of this branch.
  • Eventually, the changes are integrated back to develop and then to main.

If we look at the GitHub repository of our application, we can see a map with a clearly defined Gitflow structure, where each branch represents a specific development that is then integrated into the main flow.

How does Trunk-based Development differ from Gitflow?

The main difference between these methodologies lies in how the branches are organized:

  • In Gitflow: we create a branch for each individual issue.
  • In Trunk-based Development: we generate a branch for a list of related issues.

This distinction makes Trunk-based more suitable for small teams or teams working on related functionality, while Gitflow offers more control for large teams with multiple parallel developments.

How to integrate GitHub and Jira to automate workflow?

One of the advantages of using specialized tools is the ability to connect them together to automate processes. Let's see how to integrate GitHub with Jira:

  1. Go to Jira settings.
  2. In the applications section, find and add "GitHub for Jira".
  3. Once added, go to GitHub
  4. Insettings and applications, accept Jira's permissions

With these tools synchronized, we can create branches directly from Jira:

Select the project in Jira2.Specify that the branch will start from 'develop'3. Keep the default name suggested by Jira4. Click on "Create branch".

This integration allows us to maintain a clear traceability between the tasks in Jira and the code in GitHub, making it easier to track progress.

How does the workflow look like in Git?

After working on our branch, fixing the issue and having our pull request accepted and integrated to develop (and later to main), we can check how our workflow was in Git.

In the Git history view, we will notice:

  • The splitting of the branch each time we fix an issue.
  • A tag that marks the point where the application was released.

This tag indicates that all issues resolved up to that point are included in the specified version (e.g. v1.0.1). This organization provides a clear reference of what changes are included in each version of the software.

What's next after implementing a branching strategy?

Having a clear branching strategy is critical, but not sufficient if the release does not reach the right users. Large companies do not release upgrades indiscriminately, but rather:

  • They use specific distribution channels
  • Implement tools such as Firebase to control each release
  • Carefully define who receives an update and when

These aspects are crucial to ensure that new releases reach the right users at the right time, minimizing risks and maximizing the positive impact of each upgrade.

Implementing a proper branching strategy, along with the integration of tools like GitHub and Jira, can radically transform the efficiency of your development team. Have you implemented any of these methodologies in your projects? What challenges have you faced when managing branching in your code? Share your experience in the comments.

Contributions 0

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?