In the below branch tree, let's say you are working on Feature-branch-helper.
- master
- develop
- Feature-branch
- Feature-branch-helper
- Feature-branch
- develop
Now you completed working on Feature-branch-helper, before you merge with Feature-branch, you would want to take latest from Feature-branch. Without taking latest from Feature-branch you cannot merge. In this case we can use git stash.
Steps I follow to update current branch. Assuming you are in Feature-branch-helper.
First take backup of your changes
git stash
Second take latest of Feature-branch
git pull origin Feature-branch
Resume your changes to your branch ,Feature-branch-helper
git stash pop
Top comments (0)