Frequently Asked Questions on the Git Workflows

What is git fetch vs git pull?

Git fetch retrieves changes from a remote repository to your local repository without merging them. In contrast, git pull not only retrieves the updates but also merges them in your active branch.

When do we use git stash?

Git stash temporarily stashes current changes without discarding them so that the developer can work on other tasks in the same or other branch. These changes can be fetched later using git stash pop.

How to resolve a merge conflict?

Open the merge conflicted file in your editor to have a better understanding and visualisation of the conflicted code. Determine what changes are required and discard the rest. Once the conflicts are resolved, merge them.

How to undo a commit without loosing the file?

Use git reset –soft HEAD~1 to roll back to previous commit state. This will save the file changes in the staging area.



Git Workflows For Agile Development Teams

Git Flow is a branching model that involves the use of different types of branches based on the objective of the task.

GitFlow Workflow

Table of Content

  • The Git Flow strategy consists of the following branches
  • Agile Development Lifecycle
  • Steps to Integrate Git In Your Agile Workflow
  • Choosing the Right Git Workflow
  • Benefits of Git for Agile Teams
  • Frequently Asked Questions on the Git Workflows

Similar Reads

The Git Flow strategy consists of the following branches

Main: This branch is used for production deployment. Develop: New features are merged into this branch. Feature: A branch was created to develop a new feature. Release: This branch prepares code for a production release. Hotfix: A branch for critical production fixes....

Agile Development Lifecycle

Agile Development Lifecycle...

Steps to Integrate Git In Your Agile Workflow

Let’s see above flow through an example....

Choosing the Right Git Workflow

There are three types of Git Workflows to choose from:...

Benefits of Git for Agile Teams

Task Git branch. During the sprint planning, the Product Owner, Product Manager along with the Development team decide the scope of the upcoming sprint along with the user stories. These user stories consist of tasks and sub-tasks which are allocated to developers. Consider each task as a Git branch. With the help of code review, each task – each branch can be reviewed separately which helps in maintaining code quality. Once the development phase of a branch is complete, it can move to the next stage of the Agile Life Cycle; testing. The developer can inform the QA team that a particular feature has finished and can be tested. This helps testers to start with their work without waiting for the entire sprint tasks to be completed. The DevOps team can set up automated tests – continuous integration or continuous delivery which can be executed after every merge. Using Git strategy gives an overall transparency to the team to identify the work done on any feature and even track the changes made for any releases, bug fix or hotfixes....

Frequently Asked Questions on the Git Workflows

What is git fetch vs git pull?...