我是团队的一员.我们的过程是创建一个单独的分支,在单独的分支上工作,然后将该分支推送到"origin"并发出pull请求来掌握.
我试图通过默认命令行Git变得更好.
当另一个人在分支上发出拉取请求时.是否有一种简单的方法将该分支拉到我的本地并检查分支,以便我可以在批准拉取请求之前测试代码?
您可以检出在feature其中创建请求请求的分支(例如)。
$ git fetch
# create a new branch 'test-feature' with 'origin/feature' history
$ git checkout -b test-feature origin/feature
# now test here
Run Code Online (Sandbox Code Playgroud)
您可以合并master到test-feature分支中,然后测试一切正常!
$ git pull origin master
# test more
Run Code Online (Sandbox Code Playgroud)