Git Tags in SFRA Repositories

SFRA versions have matching Git tags. For example, SFRA version v3.3.0 corresponds to the Git tag v3.3.0. All SFRA product repositories are tagged separately but follow the same pattern. After cloning the SFRA product repositories, you can fetch the tags for each repository, list the tags, and check out the same version tag for each repository to ensure you are using the same version everywhere.

Fetching Git Tags

For each SFRA product repository, fetch all of the tags before listing them or checking them out. You can fetch the tags using the following command:

git fetch --tags

After fetching the tags, you can list them using the git tag command.

Listing Git Tags

You can list the tags for an SFRA repository as follows:

git tag

For example, issuing the git tag command against the plugin-applepay repository produces the following output (this output changes over time as tags are added):

v1.0.0
v2.0.0
v2.1.0
v3.0.0
v3.1.0
v3.2.0
v3.3.0

Checking Out Git Tags

You can checkout a Git tag using the following command:

git checkout <tag>

For example:

git checkout v3.3.0

When you checkout a tag, Git displays a message similar to the following:

Note: checking out 'v3.3.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 274a5ee7... 3.3.0

Use the suggested command to create a branch from the tag. For example:

git checkout -b my3_3_0

You can then work in the branch you created, knowing that it matches the specified version (in this example, v3.3.0).

You can repeat this process for all SFRA product repositories that you want to include in your project.