Question: The Nautilus application development team has been working on a project repository /opt/cluster.git. This repo is cloned at /usr/src/kodekloudrepos on storage server in Stratos DC. They recently shared the following requirements with DevOps team:
a. Create a new branch xfusion in /usr/src/kodekloudrepos/cluster repo from master and copy the /tmp/index.html file (on storage server itself). Add/commit this file in the new branch and merge back that branch to the master branch. Finally, push the changes to origin for both of the branches.
Solution:
ssh into storage server
ssh natasha@ststor01
Login as root
sudo su
Go to repository
cd /usr/src/kodekloudrepos/cluster
Create new branch
git checkout -b xfusion
Copy index.html
cp /tmp/index.html .
Add, commit, merge, push
git add .
git commit -m "added index.html"
git checkout master
git merge xfusion
git push origin xfusion
git push origin master
0 comments:
Post a Comment