Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Contributing] Add documentation for rebasing when contributing to the docs #19949

Open
wants to merge 3 commits into
base: 5.4
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion contributing/documentation/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,38 @@ even remove any content and do your best to comply with the

**Step 6.** **Push** the changes to your forked repository:

Rebase your branch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a heading here breaks the steps.

the case of rebasing should be a section later in the doc, not in the quick start guide for your first contribution (and maybe it could link to the documentation about rebasing a PR for code contribution instead of duplicating it, as it works exactly the same, given that this is purely about git usage)

Copy link
Author

@AndoniLarz AndoniLarz Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the idea of just using a link and made a commit accordingly.
However, I believe the link would be useful here so that beginners don't feel lost if they face this case. Be it because they began working days or weeks ago, or just minutes ago and by chance a PR got merged just in the meantime.

~~~~~~~~~~~~~~~~~~

Before submitting your PR, update your branch (needed if it takes you a
while to finish your changes):

.. code-block:: terminal

$ git checkout 6.x
$ git fetch upstream
$ git merge upstream/6.x
$ git checkout improve_install_article
$ git rebase 6.x

.. tip::

Replace ``6.x`` with the branch you selected previously (e.g. ``5.4``).

When doing the ``rebase`` command, you might have to fix merge conflicts.
``git status`` will show you the *unmerged* files. Resolve all the conflicts,
then continue the rebase:

.. code-block:: terminal

$ git add ... # add resolved files
$ git rebase --continue

Make sure that the docs still build correctly and push your branch remotely:

.. code-block:: terminal

$ git push origin improve_install_article
$ git push --force origin improve_install_article

The ``origin`` value is the name of the Git remote that corresponds to your
forked repository and ``improve_install_article`` is the name of the branch you
Expand Down
Loading