TL;DR
Replace example with your target branch!
git fetch origin
git fetch origin example:example
git merge example
Problem
Your team is using git and your team mate implemented a new method to a class. You need the current changes, which must not be published to master branch. Follow these steps:
Solution
Fetch all branches
git fetch origin
Fetch changes from specific branch
git fetch origin example:example
Merge changes from specific branch
git merge example