Git operations in Codecommit
- Once your codecommit repo is created, lets clone it as local repo by using
git clone <codecommit repo url> Example: git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo
Codecommit repo url can be found here, select the repo created in Create A CodeCommit Repository lab than click on Clone URL > Clone HTTPS
- Once you cloned the repo do change directory inside it
cd <codecommit-repo-name> Example: cd MyDemoRepo
- Now, lets add some files in current directory or our local repo
Download following source code:
Unzip in local repo - Now lets add this file to local repo by:
git add .
- Lets stage the changes in local repo by:
git commit -m "Initial commit"
- Push the changes to Codecommit repo by:
git push
- Verify the changes have pushed or not by visiting AWS console