Back

Explore Courses Blog Tutorials Interview Questions
+7 votes
2 views
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>

Browse Categories

...