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

Max Moiseev moiseev at apple.com
Wed Mar 29 13:14:02 CDT 2017


> On Mar 29, 2017, at 11:06 AM, Pavol Vaskovic <pali at pali.sk> wrote:
> 
> Thanks Max! That was very enlightening. One more question…
> 
> On 29 Mar 2017, at 19:57, Max Moiseev <moiseev at apple.com <mailto:moiseev at apple.com>> wrote:
> 
>> [...]
>> 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>
> When/where/how did you switch from upstream to your own fork (after the initial update-checkout)? Or am I misunderstanding how that works?
You don’t need to switch from one remote to the other. It is only a matter of where you get the updates from and push your changes to. Typically you would pull from the upstream (apple/swift) and push changes to origin (yourown/swift).

update-checkout script will call `git pull origin BRANCH_NAME` so, I guess my unusual approach to naming remotes works well in this case.

> 
> Best regards
> Pavol Vaskovic 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170329/c5e572a6/attachment.html>


More information about the swift-dev mailing list