<commit_before>.. _steps_git:

Git
***

git:CherryPickMerge
===================

Cherry pick's commits from one branch and then squashs the results into another.

**Parameters**

* ``repo`` (type ``str``)

  * **Required:** True
  * **Description:** Git repo to clone


* ``to_branch`` (type ``str``)

  * **Required:** True
  * **Description:** The branch to squash merge in to

* ``temp_branch`` (type ``str``)

  * **Required:** False
  * **Description:** The temporary branch to use while cherry picking (Default: mergebranch)

* ``commits`` (type ``list``)

  * **Required:** True
  * **Description:** List of commits to cherry pick<commit_msg>Updated gitworker steps.<commit_after>.. _steps_git:

Git
***

git:Merge
=========
Merges one branch into another and then pushes it back to origin.

**Parameters**

* ``repo`` (type ``str``)

  * **Required:** True
  * **Description:** Git repo to clone


* ``to_branch`` (type ``str``)

  * **Required:** True
  * **Description:** The branch to merge in to

* ``from_branch`` (type ``str``)

  * **Required:** False
  * **Description:** The branch to merge from


**Example**

To merge one commit into mybranch:

.. code-block:: yaml
   :linenos:
   :emphasize-lines: 3,6

   hosts: ['localhost']
   steps:
       - git:Merge:
           repo: git@example.com/someplace.git
           to_branch: master
           from_branch: feature


git:CherryPickMerge
===================

Cherry pick's commits from one branch and then squashs the results into another.

**Parameters**

* ``repo`` (type ``str``)

  * **Required:** True
  * **Description:** Git repo to clone


* ``to_branch`` (type ``str``)

  * **Required:** True
  * **Description:** The branch to squash merge in to

* ``temp_branch`` (type ``str``)

  * **Required:** False
  * **Description:** The temporary branch to use while cherry picking (Default: mergebranch)

* ``commits`` (type ``list``)

  * **Required:** True
  * **Description:** List of commits to cherry pick
{'fraction_non_alphanumeric': 0.18992443324937028, 'fraction_numerical': 0.0010075566750629723, 'mean_word_length': 3.9526184538653366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4186887', 'n_tokens_mistral': 636, 'n_tokens_neox': 586, 'n_words': 208}