RFR: Clearly state that users should create branch [v2]

Magnus Ihse Bursie ihse at openjdk.org
Tue Jan 17 21:59:03 UTC 2023


On Tue, 17 Jan 2023 21:47:14 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix typo
>>   
>>   Co-authored-by: Alexey Ivanov <alexey.ivanov at oracle.com>
>
> src/guide/cloning-the-jdk.md line 48:
> 
>> 46: In the example above Duke cloned his personal fork of the JDK mainline repository using SSH. You should of course use your own GitHub username instead. Then, by adding a new *remote* named 'upstream', the clone is associated with [openjdk/jdk](https://github.com/openjdk/jdk). Doing this will allow the tooling to automatically create a PR on [openjdk/jdk](https://github.com/openjdk/jdk) whenever a change is pushed to the personal fork. The way that works is that once the change has been pushed to the personal fork, and you navigate to the [openjdk/jdk](https://github.com/openjdk/jdk) repository on GitHub, there will be a message saying that you just pushed a change and asking if you want to create a PR.
>> 47: 
>> 48: You should always create a new branch for any change you intend to implement. If your PR gets accepted, it will be squashed and pushed by the OpenJDK bots. This mean that if you make changes to your `master` branch, it will diverge from the upstream `master` branch. This will cause a lot of trouble and make any future contributions messy and complicated. Having a separate branch for each change also means that you can easily work on many different changes in parallel in the same code repository. Unless you know what you are doing, the recommendation is also to always base your new branch on the `master` branch.
> 
> Suggestion:
> 
> You should always create a new branch for any change you intend to implement. If your PR gets accepted, it will be squashed and pushed by the OpenJDK bots. This means that if you make changes to your `master` branch, it will diverge from the upstream `master` branch. This will cause a lot of trouble and make any future contributions messy and complicated. Having a separate branch for each change also means that you can easily work on many different changes in parallel in the same code repository. Unless you know what you are doing, the recommendation is also to always base your new branch on the `master` branch.

Thanks!

-------------

PR: https://git.openjdk.org/guide/pull/94


More information about the guide-dev mailing list