Step 1 – Open git bash – move in the local repository :
Step 2 – Copy the Remote repository link :
Follow step 4 of connections instruction and copy the only ssh Repository link , as showing as in below screenshot ( Donβt copy and run Entair command)
Note : Refer β 2.3 Connecting Codecommit Repo with local machine using SSH for the link page
Step 3 – Add Remote Repository Origin :
π To add remote origin | git remote add origin ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/P1-ExploreWorld-Repository |
β If itβs response : error: remote origin already exists. | |
π Remove existing origin | git remote remove origin |
π Now add new origin | git remote add origin ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/P1-ExploreWorld-Repository |
Step 4 – Push the Local Repository to AWS CodeCommit Repository :
π Check the repository files status(shows updated files information) | git status |
π Add files to staging area | git add . |
π Commit the changes with name | git commit -m βUpdate Local Repository @ 05-02-2023-0902pmβ |
π Commit the changes with name | git push origin main |
Step 5 – Verify : Go to AWS Developer Tools > CodeCommit > Repositories > Select the CodeCommit project P1-ExploreWorld-Repository
πOpen the repository and Now you can see the updated code At AWS CodeCommit Repository