Lab 001: Git Create Branches
Requirements
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:
One of the developers is working on feature branch and their work is still in progress, however there are some changes which have been pushed into the master branch, the developer now wants to rebase the feature branch with the master branch without loosing any data from the feature branch, also they don't want to add any merge commit by simply merging the master branch into the feature branch. Accomplish this task as per requirements mentioned.
Also remember to push your changes once done.
Steps
SSH onto the storage server and switch to root. For the server credentials, check out the Project Nautilus documentation.
sshpass -p '**********' ssh -o StrictHostKeyChecking=no natasha@172.16.238.15
sudo su
### Proceed to the specified directory.
cd /usr/src/kodekloudrepos
### Checkout to master branch and Rebase from master branch.
git checkout master
### Rebase from master branch
##Set git rebase
git config --global pull.rebase true
### Pull from origin feature branch:
git pull origin feature
### Push changes
git push origin feature