Nautilus developers are actively working on one of the project repositories, /usr/src/kodekloudrepos/beta. They need to implement new features in a separate branch to keep those changes isolated. The DevOps team is required to:
- Create a new branch named xfusioncorp_beta from the master branch in the repository located at /usr/src/kodekloudrepos/beta on the Storage server in Stratos DC.
Please ensure no code changes are made.
-
Login to the Storage Server and Gain Root Access:
- Connect to the Storage server using SSH.
- Switch to the root user.
ssh natasha@ststor01 sudo su
-
Navigate to the Repository Directory:
- Change to the directory where the repository is located.
cd /usr/src/kodekloudrepos/beta
-
Verify the Current Branches:
- List the branches to confirm you are in the correct repository and to ensure the master branch is available.
git branch
Expected Output:
* kodekloud_beta master
-
Ensure You Are on the Master Branch:
- Switch to the master branch if not already on it. This step ensures that the new branch is created from the correct base branch.
git checkout master
-
Create and Switch to the New Branch:
- Create a new branch named xfusioncorp_beta from the master branch.
- Optionally, switch to the new branch to start working on it immediately.
git branch xfusioncorp_beta git checkout xfusioncorp_beta
Alternatively, you can combine the above two commands into a single step:
git checkout -b xfusioncorp_beta
-
Verify the New Branch Creation:
- Confirm that the new branch has been created and is currently checked out.
git branch
Expected Output:
kodekloud_beta master * xfusioncorp_beta