SAGARFIVE

1. Add changes to cloned repository, Here changed :  contact with contactus

Vi Editor opens : Press I to edit files , to save press ESC and then wq! enter

2. Adding contact-us page to staging area, next committed , after this we can see git log has this latest commit

3. Now it is the time to push the change, here we made the changes  on the github remote repository

The origin means the remote url, main is the branch where we made the changes,the changes pushed/updated on github main branch

git push origin main

4. Checking the changes on github, we can see the latest change showing with commit name

5. Moving into the commit section by clicking commits on the website below code button, we can see the commit information, so we successfully clone, added the changes and updated/pushed the changes to github remote repository

6. If we click on the commit, we can see the detailed information about the changes what we made.

2. Pushing the changes on other than main/master branch :

(i) Now we listing the local and remote branches

git branch -a

(ii) Checking out a specific branch and listing files in it

git checkout codecommit-aws
ls

(iii) Checking the commit history

git log –oneline

(iv) Created a file,added sample text,

echo “This is Travel website” > about-us.html

(v) Added file to staging area and committed

 git add about-us.html && git commit -m  “added about-us.html by user 1”

(vi) checking the logs

 git log –oneline

(vii) Pushed the changes to the branch

 git push origin codecommit-aws

(viii) Verifying the changes, moving to the browser , opening the github project, selecting the branch

(ix) we can see the commit added to the branch

(x) Clicking the commit for more info

We successfully clone, our own old project, added the changes , pushed the changes to the main and custom branches.

3. Clone someone else public repository – push changes

(i) other user : github.com/zinksonn

(ii) other user repository url : https://github.com/zinksonn/hello-world-repo.git

(iii) Cloning the repository with sagarfive(present using – logged in) account in git bash

(iv) We can see the permission denied message