On 9. Oct 2018, at 21:45, Marshall Schor <[email protected]> wrote: > > just curious, why doesn't this work: > > 1) clone project to local pc > 2) create branch, make updates > 3) commit changes > 4) create a pull request for that commit
Because in step 3, you only commit to your local clone. In order to create a pull request, the code needs to be in a GitHub repo which is accessible by the receiving party. So between 3 and 4, you'd have to push your branch to such a repository. > Is it because with this approach, my pull request would somehow need to > reference my clone on my local pc which others of course don't have access to? > I kind of thought the pull request would "encapuslate" all the info it needed, > sort of like a patch. Imagine a pull request like a glorified issue which has special fields for source and target branch. The PR is only metadata with pointers into code repositories on GitHub. I does not actually contain changes itself. > For this particular case, what I did was: > 1) clone project to local pc > 2) create branch, make updates > 3) make a "git"-style "patch" and attach the patch to the Jira. That works, but of course you loose all the nice things about the pull request such as: - ability to discuss the code line-by-line - ability by the receiving party to check out your code as a branch and collaborate with you (i.e. commit to your branch) - continuous integration builds (if configured by the receiving party) - ... Cheers, -- Richard
