logo
  • Home

  • Blog

  • Projects

  • Library

  • About

Git workflows and best practises

Version control system(VCS)

A tool for tracking and managing changes to source code and other files in a software development project

info

Git is a standard for version control system and essential tool for software development.

Understanding Git allows developers to effectively manage their code and collaborate with others, which is crucial for the success of software development projects.

Why it is important?

Collaborate, experiment and enfotce quality

By using a VCS, developers can ensure the quality and reliability of their code, and can easily track the progress of their projects over time.

How is it working?

By creating the versions(branches) of the source code, where developers can work for isolated problem and integrating(merging) their changes to the source code(main branch that considered to be the source of the truth)

Common Git best practices

  1. Use descriptive and concise commit messages
  2. Avoid large commits
  3. Use branches for different features
  4. Regularly pull and merge changes
  5. Review changes before merging
  6. Use tags to mark important milestones

Workflow patterns

There are few Git workflow patterns that can be used by teams or by individual developers. Each has its own advantages and disadvantages.

givenGit

Rebasing Workflow

A rebasing workflow is a Git workflow that is used by individual developers who prefer to keep their commits linear and avoid merge commits. In this workflow, changes are frequently rebased onto the main branch to keep the history of the project linear.

rebaseWorkflow

Centralized Workflow

A centralized workflow is a simple Git workflow that is well-suited to small teams or individual developers. In this workflow, all team members push their changes to a single central repository

centralizedGit

Feature Branch Workflow

A feature branch workflow is a more sophisticated Git workflow that is well-suited to larger teams. In this workflow, each feature is developed in its own branch, and changes are merged into the main branch when they are ready to be released.

featureMergeWorkflow

Forking Workflow

A forking workflow is a Git workflow that is used in open-source projects. In this workflow, developers fork the main repository and make changes in their own forks. When their changes are ready, they submit a pull request to the main repository, and the changes are reviewed and merged if approved.