dear-digital / linter

3 stars 14 forks source link

πŸ” [DISCOVERY] - Gitflow #88

Closed mihir-bombay-studio closed 12 months ago

mihir-bombay-studio commented 1 year ago

Is there an existing Discovery issue on this topic?

Objective

As we move ahead with our development projects, it's critical to get familiar with some essential tools and workflows. Below are some key resources to help you get a better grasp on Git and its various aspects.

πŸ“š Resources for Learning:

1️⃣ GitFlow Workflow πŸ”„

Understanding the GitFlow Workflow will give you a robust framework for collaborating on our projects. This methodology leverages the power of Git to support a project with parallel development, making it easy to segregate feature development, releases, and hotfixes.

🌟 Importance: Mastering GitFlow is vital for efficient teamwork and code management. It will help you stay organized and keep our codebase clean and well-documented.

2️⃣ GUI Git Client Software - Fork 🍴

The Fork GUI Git client simplifies many of the commands and processes in Git, making it more intuitive to perform complex Git operations. Understanding how to use this tool can speed up your workflow and reduce errors.

🌟 Importance: Utilizing a GUI Git client like Fork can make your interaction with Git more manageable and less error-prone, especially if you're new to the command line.


πŸ’‘ Bonus Tips: Please take some time to go through these resources and practice the concepts by working on some small projects or tasks. This practice will prepare you for the actual development work you'll be doing as part of a team.

Reference Materials

No response

Expected Outcome

After reviewing the GitFlow resources, please share at least one valuable insight or practice you learned that you believe could enhance our team's development workflow in the comment.

Example: πŸ’‘ Useful Insight on GitFlow: One compelling aspect of GitFlow is its systematic approach to versioning through designated branches like 'features', 'hotfixes', and 'releases'. This structure minimizes conflicts and streamlines the release process, making it easier to implement CI/CD (Continuous Integration/Continuous Deployment).

Have you provided comprehensive details for this discovery task?

kmalap05 commented 1 year ago

πŸ’‘ Useful Insight on GitFlow:

Another valuable insight from the GitFlow workflow is the concept of having a dedicated integration branch (develop) separate from the main branch. This practice can enhance your team's development workflow in the following ways:

Overall, the concept of having a dedicated integration branch like develop in GitFlow promotes collaboration, reduces integration challenges, and provides a structured approach to feature development and release planning. It can be particularly beneficial for teams working on projects with multiple features in progress simultaneously and a need for controlled release cycles.

Mri1662 commented 1 year ago

πŸ’‘ Useful Insight on GitFlow:

One valuable insight I gained from reviewing the GitFlow resources is the importance of structured branch management. Specifically, the concept of having feature, develop, and master branches in GitFlow Workflow stood out to me.

  1. Feature Branches: Creating feature branches for each new feature or task allows developers to work on their assigned tasks independently without interfering with the main codebase. It promotes a clean and isolated environment for feature development.
  2. Develop Branch: The develop branch serves as the integration point for all the completed features. It's where we combine and test all the feature branches, ensuring that they work harmoniously together. This approach helps us catch integration issues early in the development cycle.
  3. Master Branch: The master branch represents the stable and production-ready code. It only contains well-tested and reviewed code from the develop branch. This ensures that our production environment remains reliable and free from any experimental or incomplete features.

How This Can Enhance Our Team's Development Workflow

Example Workflow

  1. When working on a new feature, create a new branch from the develop branch.
  2. Make all of your changes on the feature branch.
  3. Once the feature is complete, commit your changes and push the branch to the remote repository.
  4. Create a pull request to merge the feature branch into the develop branch.
  5. Once the pull request has been reviewed and approved, merge the feature branch into the develop branch.
  6. To prepare a new release, create a new branch from the develop branch.
  7. Make any necessary changes to the release branch, such as updating documentation or fixing bugs.
  8. Once the release is ready, tag the release branch and push it to the remote repository.
  9. Deploy the release to production.
anishdalvi commented 1 year ago

πŸ’‘ Useful Insight on GitFlow:

GitFlow Workflow's Cool Feature: Automatic Branch Deletion

One of the noteworthy features of the GitFlow Workflow is its automatic branch deletion. This feature ensures that feature branches don't accumulate indefinitely in the repository, helping keep the repository organized.

Overview of GitFlow Workflow:

The GitFlow Workflow operates with several branches to manage the development and release process effectively:

  1. Master Branch: This branch represents the production version of the project. It contains stable and tested code ready for deployment.

  2. Develop Branch: All feature branches are merged into the Develop branch after successful feature implementation. This central branch serves as a staging area for ongoing development.

  3. Feature Branches: Each feature or task is developed in its own dedicated branch. Once a feature is complete, it's merged into the Develop branch.

  4. Release Branch: When all planned features are merged into Develop and it's time for a release, a release branch is created. This branch is used for final bug fixes and preparing for release. Changes from the release branch are merged into both Master and Develop using the command git flow release finish 'version'. After successful merge, the release branch is automatically deleted.

  5. Hotfix Branch: If any critical bugs are found in the production version (Master Branch), a hotfix branch is created to address these issues. After resolving the bug and fixing the error, changes are added to both Master and Develop branches using the command git flow hotfix finish 'version'. Once successfully merged, the hotfix branch is deleted.

  6. Tags: Tags are used to mark specific versions of releases and hotfixes, providing a reference point for historical versions of the project.

The Workflow in Action:

How this will help for our Linter Repository?

In our Linter Repository, we currently operate with a single main branch that stores the correct, runnable production release code. If errors are detected in this main branch, the process of resolving these errors and then manually pulling or merging the modified main branch into other branches can be a tedious task. GitFlow offers an elegant solution to address these challenges. It simplifies error resolution in the main branch by enabling the creation of hotfix branches. These branches allow us to easily address errors, with changes automatically merged back into both the main and develop branches, reducing manual developer efforts. Additionally, GitFlow's release branches provide a structured environment for pre-production testing, ensuring that our code is thoroughly examined for release-specific issues before deployment. This streamlined approach enhances the efficiency and reliability of our Linter Repository, making it an essential tool for maintaining a stable and high-quality codebase.


abhishekjani08 commented 1 year ago

πŸ’‘ Useful Insight on GitFlow:

Overview

What is GitFlow? GitFlow is a branching model that helps teams manage and streamline their Git-based software development workflow. It defines specific branches and guidelines for different stages of development, making collaboration more organized and efficient.

Branches in GitFlow

GitFlow revolves around the following types of branches:

  1. Main Branches

    • master: The master branch represents the production-ready code. It should always contain the latest stable release.
    • develop: The develop branch is where ongoing development and integration of new features take place. It serves as the base for creating feature branches.
  2. Feature Branches

    • Feature branches are used for developing new features or functionalities.
    • They branch off from the develop branch and are merged back into develop upon completion.
    • Naming convention: feature/{feature-name}
  3. Release Branches

    • Release branches prepare the code for a new production release.
    • They branch off from develop when the development for a release is done.
    • Any necessary last-minute bug fixes can be made in the release branch.
    • Once the release is ready, it's merged into master and develop.
    • Naming convention: release/{version}
  4. Hotfix Branches

    • Hotfix branches are used for quickly addressing critical issues or bugs in the production code (master branch).
    • They branch off directly from master.
    • After fixing the issue, they're merged into both master and develop.
    • Naming convention: hotfix/{issue-description}

Overiew of all branches in a diagram

image

Implementation of these branches with the help of a project

Benefits of GitFlow

Conclusion

GitFlow is a powerful branching model that simplifies the development process by providing a clear structure for managing code at various stages. It fosters collaboration, ensures code stability, and helps teams release high-quality software.