From 331e42da9b153c6c7b00022de0cac1b5c47fd4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 24 Jan 2023 20:18:44 +0100 Subject: [PATCH] Use a more straightforward setup method Not everyone wants to contribute directly, some people might want to toy with the repository before deciding to fork. --- source/contribute.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/contribute.rst b/source/contribute.rst index e307d8f9..83b9bb52 100644 --- a/source/contribute.rst +++ b/source/contribute.rst @@ -41,21 +41,29 @@ contributing back to a Doctrine project. Initial Setup ------------- +- Clone the project - Setup a `GitHub `_ account. - Fork the repository of the project you want to contribute to. In this example it will be `DBAL `_ -- Clone your fork locally +- Make the local repository aware of your fork. .. code-block:: console - $ git clone git@github.com:username/dbal.git + $ git clone --origin doctrine git@github.com:doctrine/dbal.git -- Enter the dbal directory and add the **doctrine** remote +At that point, you have a repository, and you should be able to start +doing changes. Later on, if you end up with something you are satisfied +with, you will need to be able to push your changes to your fork. + +Here is how you can make your local repository aware of your fork: .. code-block:: console $ cd dbal - $ git remote add doctrine git://github.com/doctrine/dbal.git + $ git remote add fork git@github.com:username/dbal.git + +You should now have two remotes: one called ``doctrine``, another called +``fork``. Branching from the default branch ---------------------------------