Update Git Repository with Sample HTML File

Tasks

  • A repository named /opt/games.git has been created.

  • It has been cloned to /usr/src/kodekloudrepos/games on the storage server.

  • A sample index.html file is located on the jump host at /tmp/index.html.

  • Copy the file to /usr/src/kodekloudrepos/games on the storage server.

  • Add and commit the file to the repository.

  • Push the changes to the master branch.

Steps

1

Check the file location

cd /tmp
ls
2

Copy file

sudo scp /tmp/index.html natasha@ststor01:/tmp

passwd : Bl@kW

3

SSH into the Storage server (natasha's server 😂)

ssh natasha@ststor01
4

Copy index.html to the path

cp index.html /usr/src/kodekloudrepos/games
5
cd /usr/src/kodekloudrepos/games
6

Git status

sudo git status
7

Add, Commit and Push

sudo git add index.html
sudo git commit -m "add index.html"
sudo git push origin master 

Last updated