<commit_before>.. _committing:

Committing and Pushing Changes
==============================

Once a change patch is ready and tested, it can be committed to the repository.
We usually prefer to put a whole feature or bugfix into a single commit, but no
more.  In particular:

* Do **not** fix more than one issue in the same commit (except, of course, if
  one code change fixes all of them).
* Do **not** do cosmetic changes to unrelated code in the same commit as some
  feature/bugfix.


Patch Checklist
---------------

Here's the simple patch checklist that ``make patchcheck`` (or  ``./python.exe
Tools/scripts/patchcheck.py`` on Windows) will run through
on a system that uses the makefile to build Python:

* Are there any whitespace problems in Python files?
  (using Tools/scripts/reindent.py)
* Are there any whitespace problems in C files?
* Are there any whitespace problems in the documentation?
  (using Tools/scripts/reindent-rst.py)<commit_msg>Some more advice about merges.<commit_after>.. _committing:

Committing and Pushing Changes
==============================

Once a change patch is ready and tested, it can be committed to the repository.
We usually prefer to put a whole feature or bugfix into a single commit, but no
more.  In particular:

* Do **not** fix more than one issue in the same commit (except, of course, if
  one code change fixes all of them).
* Do **not** do cosmetic changes to unrelated code in the same commit as some
  feature/bugfix.

It is of course okay to pile up several commits to one branch and merge them
into another in one merge commit.


Patch Checklist
---------------

Here's the simple patch checklist that ``make patchcheck`` (or  ``./python.exe
Tools/scripts/patchcheck.py`` on Windows) will run through
on a system that uses the makefile to build Python:

* Are there any whitespace problems in Python files?
  (using Tools/scripts/reindent.py)
* Are there any whitespace problems in C files?
* Are there any whitespace problems in the documentation?
  (using Tools/scripts/reindent-rst.py)
{'fraction_non_alphanumeric': 0.10608272506082725, 'fraction_numerical': 0.0, 'mean_word_length': 3.9902912621359223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5061097', 'n_tokens_mistral': 551, 'n_tokens_neox': 528, 'n_words': 291}