Skip to content

Commit

Permalink
Use a more straightforward setup method
Browse files Browse the repository at this point in the history
Not everyone wants to contribute directly, some people might want to toy
with the repository before deciding to fork.
  • Loading branch information
greg0ire committed Mar 6, 2023
1 parent b023b9d commit 331e42d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions source/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,29 @@ contributing back to a Doctrine project.
Initial Setup
-------------

- Clone the project
- Setup a `GitHub <https://github.com>`_ account.
- Fork the repository of the project you want to contribute to. In this example
it will be `DBAL <https://github.com/doctrine/dbal>`_
- Clone your fork locally
- Make the local repository aware of your fork.

.. code-block:: console
$ git clone [email protected]:username/dbal.git
$ git clone --origin doctrine [email protected]: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 [email protected]:username/dbal.git
You should now have two remotes: one called ``doctrine``, another called
``fork``.

Branching from the default branch
---------------------------------
Expand Down

0 comments on commit 331e42d

Please sign in to comment.