[swift-dev] How to create my first pull request

Max Moiseev moiseev at apple.com
Wed Mar 29 12:57:47 CDT 2017


Hi Pavol,

update-checkout, as far as I know, is only there to help you work with *all* the Swift repositories at the same time. This way you won’t have to separately go to every folder and invoke `git pull origin master`. The config file for update-checkout simply lists the ‘schemes’ which are the combinations of branches from different repos that are compatible with each other. For example, master branch in apple/swift repository supposed to be compiled with ‘stable’ branches of llvm and clang, which is not true for the ‘swift-3.0-branch’ branch, for example, it should be compiled with ‘swift-3.0-branch’ of llvm etc.

Long story short, it is possible to update the update-checkout and its config to simplify your workflow, but you don’t have to do so.

I personally use this script only before starting a new branch, to make sure that my changes go on top of current master and simplify merging them later.

cd swift
git checkout master
utils/update-checkout --scheme=master
git checkout -b my-new-branch
... some work gets done …
git add .
git commit -m “Adding an absolutely awesome new feature”
git push mine my-new-branch # please note that I prefer to call my personal fork ‘mine’ whereas usually people call their fork remotes ‘origin’ and the upstream ‘upstream’.
open https://github.com/apple/swift <https://github.com/apple/swift>

Within a few seconds at the top of the github page you will see something like this:

Pressing this green button will initiate the creation of your Pull Request with the changes you’ve just pushed to your fork.

Hope this helps,
Max


> On Mar 29, 2017, at 10:35 AM, Pavol Vaskovic <pali at pali.sk> wrote:
> 
> Hi Max!
> 
> On 28 Mar 2017, at 01:19, Max Moiseev <moiseev at apple.com <mailto:moiseev at apple.com>> wrote:
> 
>> This tutorial looks very detailed and should answer most of your questions: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github <https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github>
> Thank you for that link! But I'd like to hear how does that general process integrate with the `update-checkout` script provided in the swift project. That's what is described in the Getting Started part of the Readme.md and I'd love to see more thorough description on the Contributing Code section. 
> 
> I'm confused about where/how do I switch my local copy created by the `update-checkout` script to use my own fork from https://github.com/palimondo/swift <https://github.com/palimondo/swift>
> Will that script get confused when I manually mess with the directory structure it created? What is the update-checkout-config.json for?
> 
> Best regards
> Pavol Vaskovic 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170329/6d7edfd3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apple_swift__The_Swift_Programming_Language.png
Type: image/png
Size: 47549 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170329/6d7edfd3/attachment.png>


More information about the swift-dev mailing list