:doc:`CodeCommit <../../codecommit>` / Client / merge_branches_by_fast_forward

******************************
merge_branches_by_fast_forward
******************************



.. py:method:: CodeCommit.Client.merge_branches_by_fast_forward(**kwargs)

  

  Merges two branches using the fast-forward merge strategy.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/MergeBranchesByFastForward>`_  


  **Request Syntax**
  ::

    response = client.merge_branches_by_fast_forward(
        repositoryName='string',
        sourceCommitSpecifier='string',
        destinationCommitSpecifier='string',
        targetBranch='string'
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository where you want to merge two branches.

    

  
  :type sourceCommitSpecifier: string
  :param sourceCommitSpecifier: **[REQUIRED]** 

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

    

  
  :type destinationCommitSpecifier: string
  :param destinationCommitSpecifier: **[REQUIRED]** 

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

    

  
  :type targetBranch: string
  :param targetBranch: 

    The branch where the merge is applied.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'commitId': 'string',
          'treeId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **commitId** *(string) --* 

        The commit ID of the merge in the destination or target branch.

        
      

      - **treeId** *(string) --* 

        The tree ID of the merge in the destination or target branch.

        
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.TipsDivergenceExceededException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidCommitException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidTargetBranchException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidBranchNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.BranchNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.BranchNameIsTagNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.BranchDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.ManualMergeRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.ConcurrentReferenceUpdateException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  