0

Well, I am a bit new to git.

I am working on a project with my team members, I created a git repo that has my source code. A team member makes a fork of my repo, makes some addition and then submits a pull request to my master branch.

I want to test this code first before merging it into my master branch, he created a topical branch named "additional-changes" for the pull request and maybe deletes the branch after submitting the request.

so I go this way

git checkout -b test origin/master

but I get errors.

So do I need to add a remote for this team member's branch first before checking it out? I get errors like the branch does not exist.

Please ignore my long stories and just give me a step by step procedure to handle a situation like this.

Thanks

Excellent Lawrence
  • 946
  • 11
  • 11

1 Answers1

0

Updated: It appears you can pull merge requests locally Git: How to checkout merge request locally, and create new local branch?

Add his forked project as a remote:

git remote <name_other_than_origin> <url>

Then you would do the following:

git fetch <name_of_forked_remote>
git checkout additional-changes

See How do I check out a remote Git branch? and Checkout branch on different remote.

zmike
  • 1,090
  • 10
  • 24