The Nautilus application development team has been working on a project repository /opt/official.git. This repo is cloned at /usr/src/kodekloudrepos on storage server in Stratos DC. They recently shared the following requirements with the DevOps team:
There are two branches in this repository, master and feature. One of the developers is working on the feature branch and their work is still in progress, however they want to merge one of the commits from the feature branch to the master branch, the message for the commit that needs to be merged into master is Update info.txt. Accomplish this task for them, also remember to push your changes eventually.
Login into Storage Server
Move into cloned repository
sudo su
cd /usr/src/kodekloudrepos/official
Check Git branches
git branch
If you are already in feature branch?
git log
take note of hash for specific commit we are going to merge into master branch
Switch to master branch to pick commit and push
git switch master
git cherry-pick commit-hash
git push
git cherry-pick commit-hashgit cherry-pick hash1 hash2git cherry-pick start-hash..end-hashgit cherry-pick --no-commit - Stage without committinggit cherry-pick --continue after resolvinggit cherry-pick --abort to cancel operation