This is a good idea to create separate branches in git repository for a new features. In that scenario, don’t forgot to keep your feature branch up to date from master branch. So update your feature branch on a regular interval to avoid any merge conflicts.
This tutorial will help you to update your feature branch from parent branch. We assume your parent branch is ‘master’. Execute following command to rebase your feature branch with master branch.
git checkout master
git checkout -
git rebase master
The above commands do the followings.
- Checkout the master branch and switch to it
- Update master branch with latest code
- Change back to your feature (original) branch
- Rebase feature branch with master branch code