Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

How to specify different branch instead of master branch on AWS code deploy while using Github as a source provider? I see there is no option to select in the console to select a branch(maybe I missed).

I tried to checkout to different branch while we are in the pre_build phase, but it failed in the Download Source phase itself as the master branch doesn't have YAML file.

version: 0.1

phases:

  install:

    commands:

      - apt-get update -y

  pre_build:

    commands:

      - git checkout testbranch

1 Answer

0 votes
by (44.4k points)

You can specify the branch in the "source version" field when you start a build. It will accept anything that "git checkout" accepts: commit ID, branch, tag, etc.

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...