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,230 points
1,248 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,440 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,170 points
18,940 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,090 points
2,929 views
0 votes
1 answer

What are branches in AWS CodeCommit and how to create one?

To create branches, click on Branches on ...READ MORE

answered Jun 13, 2019 in AWS by Trisha
1,012 views
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,440 points
2,063 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 24, 2020 in AWS by MD
• 95,440 points
686 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,440 points
2,200 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP