Skip to content

feat(init): add --checkout option to sam init command for specifying git branch, tag, or commit for cookiecutter projects#9045

Open
MustafizSaadi wants to merge 1 commit into
aws:developfrom
MustafizSaadi:3555-add-checkout-flag-for-sam-init-command
Open

feat(init): add --checkout option to sam init command for specifying git branch, tag, or commit for cookiecutter projects#9045
MustafizSaadi wants to merge 1 commit into
aws:developfrom
MustafizSaadi:3555-add-checkout-flag-for-sam-init-command

Conversation

@MustafizSaadi
Copy link
Copy Markdown

@MustafizSaadi MustafizSaadi commented May 23, 2026

Which issue(s) does this change fix?

#3555

Why is this change necessary?

Currently, sam init cannot clone a remote template and check out a specific branch/tag/commit in one step. The template have to be cloned first and then do a local checkout. Only then the specific branch/tag/commit could be utilized to initialize sam project which is not intuitive.

How does it address the issue?

The change adds a checkout flag with the sam init command. With the help of that the developers can checkout to their remote url custom branch, tag, or commit utilizing the sam init command. Also, added unit tests for checkout and updated the existing unit tests for the new checkout flag.

What side effects does this change have?

No side effects.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…git branch, tag, or commit for cookiecutter projects
@MustafizSaadi MustafizSaadi requested a review from a team as a code owner May 23, 2026 13:42
@github-actions github-actions Bot added area/init sam init area/schema JSON schema file pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/init sam init area/schema JSON schema file pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant