Lab Information
The Nautilus application development team has been working on a project repository /opt/games.git. This repo is cloned at /usr/src/kodekloudrepos on storage server in Stratos DC. They recently shared the following requirements with DevOps team:
Create a new branch nautilus in /usr/src/kodekloudrepos/games repo from master and copy the /tmp/index.html file (present on storage server itself) into the repo. Further, add/commit this file in the new branch and merge back that branch into master branch. Finally, push the changes to the origin for both of the branches.
Lab Solutions
Step-by-Step Solution
- Login to Storage Server
ssh natasha@ststor01.stratos.xfusioncorp.com
# Password when prompted: Bl@kW
- Switch to root
sudo su -
# Password when prompted: Bl@kW
- Go to the repository
cd /usr/src/kodekloudrepos/games
# Verify:
git status
- Create and switch to new branch nautilus
git checkout -b nautilus
# Verify:
git branch
- Copy the file into the repo
cp /tmp/index.html .
# Verify:
ls
- Stage and commit
git add index.html
git commit -m "Add index.html file"
- Switch back to master and merge
git checkout master
git merge nautilus
- Push BOTH branches
git push -u origin nautilus
git push -u origin master

Top comments (0)