This Lab has the step by step instructions to setup a Repository in AWS CodeCommit, add the pre-developed Lambda Application Code and commit the Changeset
Ensure that you have already went through the AWS CI CD using AWS Developer Tools & create IAM User, Group and S3 bucket before we move forward.
- Login to AWS Console as `codedeploy_user` & go to AWS CodeCommit dashboard
- Create an empty repository as, codecommit_lambda and you may Skip SNS Topic as of now and view the Connect to your repository screen
-
3. Get the clone URL (say git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/codecommit_lambda), paste run it on your terminal. It will ask for username and password, enter the Git Credentials you have generated in Lab-9. You will get a warning that you appear to have cloned an empty repository and you are good to proceed.
-
- Download the Serverless Application source code from here and commit to your Git Repo using the commands as in below command line reference
- $ git clone <git URL>
$ git init
$ git status
- $ git add .
$ git commit -m "Adding Serverless Application to CodeCommit Repo"
$ git push
$ git status
-
Now your source code is in git and may use the below command to commit the changes, if any, to the source code
- git status - To view the changes
- git add . - to add all changes to the local repo and use git add <folder[/file]> to add selected folder or file to the local repo
- git rm . - to add all changes to the local repo and use git rm <folder[/file]> to add selected folder or file to the local repo
- git commit -m “what changes are getting in”
- git commit --amend - will open the editor for you to modify the commit. Commit can be modified from command line as well using git commit --amend -m “New Commit”
- git push - push the changes to the remote
- git log -2 - gives the last two commit
- git branch -lvv - gives the local branches with remote mapping
- git checkout <branchname> - to checkout from a remote branch
- git branch -D <branchname> - to delete a local branch
- git reset --hard <branchname> - to do a hard reset to the head of the revision from the remote - This is helpful if your local branch is messed-up and you want to overwrite everything from remote.
Ensure that you have already went through the AWS CI CD using AWS Developer Tools & create IAM User, Group and S3 bucket before we move forward.
- Login to AWS Console as `codedeploy_user` & go to AWS CodeCommit dashboard
- Create an empty repository as, codecommit_lambda and you may Skip SNS Topic as of now and view the Connect to your repository screen
3. Get the clone URL (say git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/codecommit_lambda), paste run it on your terminal. It will ask for username and password, enter the Git Credentials you have generated in Lab-9. You will get a warning that you appear to have cloned an empty repository and you are good to proceed.
$ git init
$ git status
$ git push
$ git status
No comments:
Post a Comment