Suppose you have one release branch and you have created a feature branch from the release branch. Now you want to update your feature branch with release branch. This is a typical case of every developer. Let do it
Branches:
1.release
2.featureNow we want to update our feature branch with release branch
Table of Contents
Step 1:
check the status of your feature branch
git statusIf there is anything which need to commit, then first commit then proceed further
Step 2:
If your git status is clean, then you are good to go further. Now you have to checkout your release branch.
git checkout releaseStep 3:
After checkout of your release branch, now have to pull all changes of release branch.
git pullStep 4:
Now have all release branch change in your local, to merge it with your feature branch you need to checkout your feature branch again.
git checkout featureStep 5:
This is the last step. In this you have to merge release branch changes into feature branch.
git merge releaseNow, in your feature branch you have all release branch changes. Now you can push it into your git.
Summary
1. git checkout <your_branch_in_which_you want_to_merge>
2. git checkout <branch_with_which_you_want_to_merge>
3. git pull
4. git checkout <your_branch_in_which_you want_to_merge>
5. git merge <branch_used_in_step_2>Example
1. git checkout feature
2. git checkout release
3. git pull
4. git checkout feature
5. git merge release
