How to merge two branches using the squash merge strategy in AWS CodeCommit

0 votes

Hi Guys,

I have two branches in the AWS CodeCommit repository. I made some changes in the master branch. Now I am trying to merge the two branches. But it is showing merge conflicts. How can I merge two branches using the squash merge strategy?

Nov 24, 2020 in AWS by akhtar
• 38,170 points
475 views

1 answer to this question.

0 votes

Hi@akhtar,

You can merge two branches using the squash merge strategy. The following merge-branches-by-squash example merges the specified source branch with the specified destination branch in a repository named MyDemoRepo.

$ aws codecommit merge-branches-by-squash \
    --source-commit-specifier bug1 \
    --destination-commit-specifier bug2 \
    --author-name "Maria Garcia" \
    --email "xxxxx@example.com" \
    --commit-message "Merging two fix branches to prepare for a general patch." \
    --repository-name MyDemoRepo
answered Nov 24, 2020 by MD
• 95,060 points

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,150 points
11,234 views
0 votes
1 answer

How to Pass the VPC ID while creating the Ec2 instance in AWS using Python Boto3

import boto3 ec2 = boto3.resource('ec2') instance = ec2.create_instances( ...READ MORE

answered Jan 29, 2019 in AWS by Priyaj
• 58,100 points
1,301 views
0 votes
1 answer
0 votes
1 answer

How to change the default branch for a repository in AWS CodeCommit?

Hi@akhtar, You can set or change the default branch name ...READ MORE

answered Nov 24, 2020 in AWS by MD
• 95,060 points
95 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to merge two branches using the fast-forward merge strategy in AWS CodeCommit?

Hi@akhtar, The following merge-branches-by-fast-forward example merges the specified ...READ MORE

answered Nov 23, 2020 in AWS by MD
• 95,060 points
51 views
0 votes
1 answer

how to get the list of aws services i am used in aws my account by using the lambda function

Hi@shalk, You can create a session in your ...READ MORE

answered Sep 24, 2020 in AWS by MD
• 95,060 points
108 views