Pull in new remote branches to a local development environment using Git?

itsbambi asked this question 11 months ago
itsbambi on Mar 4, 2022

I have a local repository on my machine where I am doing development work.

How do I pull in new branches that were created on the remote repository by other members of my team?

Is there a command for this?

4 suggested answers
nick on Mar 4, 2022
git fetch
0 replies
yaboy01 on May 6, 2022

You can use the pull command:

git pull

And then list out the git branch -a to list all your branches:

git branch -a
0 replies
suparman21 on May 6, 2022

You fetch remote branches with this command:

git fetch origin

Then the remote branches should show up locally:

git branch -a
0 replies
timmy123 on May 6, 2022

Try this: git fetch && git checkout name_of_remote_branch

0 replies