SAGARFIVE

Projects

2.8 Pushing the code to Codecommit & Verifying the code at codecommit Repository

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       origingit 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 origingit remote remove origin
πŸ“‹ Now add new      origingit 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 areagit add .
πŸ“‹ Commit the changes with namegit commit -m β€œUpdate Local Repository @ 05-02-2023-0902pm”
πŸ“‹ Commit the changes with namegit 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

Share

Facebook
LinkedIn
WhatsApp
Pinterest
Telegram
Email

Share