Most of those above methods works but I would like to present this approach which worked well for me.
Step 1: List all remote branches that are available
git fetch
git branch -r
The out put may look as shown below depending on available remote branches for your project.
origin/HEAD -> origin/master
origin/develop
origin/feature/modular_approach
origin/master
Step 2:
Make sure to commit all your changes on the current branch as git will throw some errors and warning about uncommited codes.
Select a branch and run this command.
git checkout origin/feature/modular_approach