Git Manage Remotes

Tasks

  • Navigate to the /usr/src/kodekloudrepos/media directory.

  • Add a new remote named dev_mediapointing to /opt/media.git using Git.

  • Copy the file /tmp/index.html into the repository.

  • Add the copied file to the staging area and commit it to the master branch.

  • Push the master branch to the new remote dev_media.

Steps

1

ssh to storage server

ssh natasha@ststor01
2

get su access

sudo su -
3

Navigate to the /usr/src/kodekloudrepos/media directory.

cd /usr/src/kodekloudrepos/media
4

Add a new remote named dev_media pointing to /opt/xfusioncorp_media.git using Git.

git remote add dev_media /opt/xfusioncorp_media.git
5

Copy index.html to current path

cp /tmp/index.html .
6

Add, Commit and Push index.html to master

git add index.html
git commit -m "add index.html"
7

Push master branch to dev_media

git push dev_media master

Last updated