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.
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