Lab Information
Nautilus developers are actively working on one of the project repositories, /usr/src/kodekloudrepos/media. Recently, they decided to implement some new features in the application, and they want to maintain those new changes in a separate branch. Below are the requirements that have been shared with the DevOps team:
On Storage server in Stratos DC create a new branch xfusioncorp_media from master branch in /usr/src/kodekloudrepos/media git repo.
Please do not try to make any changes in the code.
Lab Solutions
Step-by-Step Instructions
- SSH into the Storage Server
From jump host (if required):
ssh natasha@ststor01.stratos.xfusioncorp.com
# password: Bl@kW
- Go to the Git repository directory
cd /usr/src/kodekloudrepos/media
Verify it is a git repo:
git status
You should see something like:
To add an exception for this directory, call:
git config --global --add safe.directory /usr/src/kodekloudrepos/media
- Ensure you are on the master branch
This is very important.
git branch
If not, switch to master:
git checkout master
Output
fatal: Unable to create '/usr/src/kodekloudrepos/media/.git/index.lock': Permission denied
Change permission and checkout
sudo chown -R natasha:natasha /usr/src/kodekloudrepos/media
git checkout master
- Create the new branch from master
Run ONLY this command:
git branch xfusioncorp_media
- Verify the branch was created
git branch
Top comments (0)