Skip to content

Commit 4959ec2

Browse files
committed
DOC: Move rebase section to optional. Edit doc contribution section. (pandas-dev#19412)
1 parent d7bcb22 commit 4959ec2

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

doc/source/contributing.rst

+30-28
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,9 @@ after updating.
262262
Contributing to the documentation
263263
=================================
264264

265-
If you're not the developer type, contributing to the documentation is still of
266-
huge value. You don't even have to be an expert on *pandas* to do so! In fact,
265+
Contributing to the documentation benefits everyone who uses *pandas*.
266+
We encourage you to help us improve the documentation, and
267+
you don't have to be an expert on *pandas* to do so! In fact,
267268
there are sections of the docs that are worse off after being written by
268269
experts. If something in the docs doesn't make sense to you, updating the
269270
relevant section after you figure it out is a great way to ensure it will help
@@ -966,32 +967,6 @@ Now you can commit your changes in your local repository::
966967
967968
git commit -m
968969
969-
Combining commits
970-
-----------------
971-
972-
If you have multiple commits, you may want to combine them into one commit, often
973-
referred to as "squashing" or "rebasing". This is a common request by package maintainers
974-
when submitting a pull request as it maintains a more compact commit history. To rebase
975-
your commits::
976-
977-
git rebase -i HEAD~#
978-
979-
Where # is the number of commits you want to combine. Then you can pick the relevant
980-
commit message and discard others.
981-
982-
To squash to the master branch do::
983-
984-
git rebase -i master
985-
986-
Use the ``s`` option on a commit to ``squash``, meaning to keep the commit messages,
987-
or ``f`` to ``fixup``, meaning to merge the commit messages.
988-
989-
Then you will need to push the branch (see below) forcefully to replace the current
990-
commits with the new ones::
991-
992-
git push origin shiny-new-feature -f
993-
994-
995970
Pushing your changes
996971
--------------------
997972
@@ -1056,6 +1031,33 @@ updated. Pushing them to GitHub again is done by::
10561031
This will automatically update your pull request with the latest code and restart the
10571032
:ref:`Continuous Integration <contributing.ci>` tests.
10581033
1034+
Combining commits (optional)
1035+
----------------------------
1036+
1037+
*For many contributions, this step will be unneeded. It's included to help
1038+
those who are updating an open pull request.*
1039+
1040+
If you have multiple commits, you may want to combine them into one commit, often
1041+
referred to as "squashing" or "rebasing". This is a common request by package maintainers
1042+
when submitting a pull request as it maintains a more compact commit history. To rebase
1043+
your commits::
1044+
1045+
git rebase -i HEAD~#
1046+
1047+
Where # is the number of commits you want to combine. Then you can pick the relevant
1048+
commit message and discard others.
1049+
1050+
To squash to the master branch do::
1051+
1052+
git rebase -i master
1053+
1054+
Use the ``s`` option on a commit to ``squash``, meaning to keep the commit messages,
1055+
or ``f`` to ``fixup``, meaning to merge the commit messages.
1056+
1057+
Then you will need to push the branch (see below) forcefully to replace the current
1058+
commits with the new ones::
1059+
1060+
git push origin shiny-new-feature -f
10591061
10601062
Delete your merged branch (optional)
10611063
------------------------------------

0 commit comments

Comments
 (0)