Back

Explore Courses Blog Tutorials Interview Questions
+7 votes
1 view
in DevOps and Agile by (19.4k points)
edited by

I have a project with multiple branches. I've been pushing them to GitHub, and now that someone else is working on the project I need to pull their branches from GitHub. It works fine in master. But say that someone created a branch xyz. How can I pull branch xyz from GitHub and merge it into branch xyz on my localhost?

1 Answer

+9 votes
by (27.5k points)

The following command works like a charm:

git checkout -b <new_branch> <remote repo name>/<new_branch>

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...