Thursday, September 15, 2016

How to get your colleague Pull request into your system for testing

For my own reference:

git remote add coworker
git fetch coworker
git checkout --track coworker/TIMOB-23628

If your co-worker has made some more changes, then you pull the latest changes in the below way.

git checkout TIMOB-23628

git pull

To push it back to your colleague branch
git puh coworker TIMOB-23628

Another way would be

To fetch a remote PR into your local repo,
git fetch origin pull/ID/head:BRANCHNAME

where ID is the pull request id and BRANCHNAME is the name of the new branch that you want to create. Once you have created the branch, then simply

git checkout BRANCHNAME

No comments:

Post a Comment