Aws code injection services - Aws codecommit


Aws code injection services - Aws codecommit

AWS CodeCommit is an Amazon Web Services version control service that you may use to store and manage assets (including documents, source code, and binary files) anonymously in the cloud. See Pricing for further details on CodeCommit pricing.

AWS's version control solution, CodeCommit, allows you to securely save your code and other assets in the cloud.

Step 1: Create a CodeCommit repository

  1. Go to https://console.aws.amazon.com/codesuite/codecommit/home to see the CodeCommit console.
  2. Select the AWS Region where you wish to establish the repository using the region picker.
  3. Select the option to create a repository.
  4. Enter a name for your repository in the Repository name field on the Create repository page (for example, MyDemoRepo).
  5. Select Create.

Step 2: Make a local repository

  1. Go to https://console.aws.amazon.com/codesuite/codecommit/home to see the CodeCommit console.

Step 3: Create your first commit

You make your first commit in your local repo in this stage. You'll need to generate two example files in your local repo to do this. You use Git to prepare the change in your local repo before committing it.

Create the following two sample text files in your directory using a text editor. The files should be named cat.txt and dog.txt, respectively:

cat.txt
———-

The domestic cat (Felis catus or Felis silvestris catus) is a tiny carnivorous animal that is generally hairy.

dog.txt
-------

Man's best buddy is a canid known as the domestic dog (Canis lupus familiaris).

Run git config to add your user name and email address to your local repo, which are represented by placeholders your-user-name and your-email-address. This makes it easy to track down your commits:

—local user.name "your-user-name" git config

  1. —local user.email your-email-address git config
  2. If you didn't change your default branch name to main when you established the local repo, execute the command below to do so:
  3. —local init.defaultBranch main git config
  4. To stage the change, use git add:
  5. add cat.txt dog.txt to git
  6. To commit the modification, use git commit:
  7. "Added cat.txt and dog.txt" git commit -m
  • You have the following choices for forwarding the code to future operations when a code change is detected:
  • Default – Sets the CodeCommit source action to generate a ZIP file that contains a shallow copy of your commit.
  • Full clone — Sets the source action to produce a Git URL reference to the repository, which may then be used in further actions.
  • Currently, downstream CodeBuild operations may only use the Git URL reference to clone the repo and related Git information. An issue occurs when attempting to give a Git URL reference to non-CodeBuild activities.