Question
1. Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password
1. Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!. 2. At the command prompt, type mkdir /shellscripts and press Enter. Next, type mv diskconfig.sh dirbackup.sh familydatabase.sh /shellscripts and press Enter to move your shell scripts from Project 7-5 to the /shellscripts directory. 3. At the command prompt, type cd /shellscripts and press Enter. Next, type git init and press Enter to create a Git repo in your current directory. Finally, type ls -a and press Enter to verify the creation of the .git subdirectory. 4. At the command prompt, type git status and press Enter. Note that your shell scripts are detected but not managed by Git yet. Next, type git add * and press Enter to add your shell scripts to the index. Finally, type git status and press Enter to verify that your shell scripts are ready for commit. 5. At the command prompt, type git commit -m "First commit" and press Enter. What error did you receive and why? Next, type git config --global user.email "root@domain.com" and press Enter to set your email address. Next, type git config --global user.name "root user" and press Enter to set your user name. Finally, type git commit -m "First commit" and press Enter to create your first commit. 6. At the command prompt, type vi diskconfig.sh and press Enter. Add the following lines to the bottom of the diskconfig.sh file. When finished, save and quit the vi editor. echo -e " RAID Configuration: " >>$FILENAME.report mdadm --detail /dev/md0 >>$FILENAME.report. 7. At the command prompt, type git status and press Enter. Did Git detect the modification to diskconfig.sh? Next, type git add * and press Enter to add your shell scripts to the index. Finally, type git commit -m "Added RAID to diskconfig.sh" and press Enter to create a second commit that represents your change. 8. At the command prompt, type git log and press Enter. Note the commit identifier next to your original commit (before the RAID section was added). Next, type git reset --hard commitID and press Enter, where commitID is the commit identifier for your original commit. Finally, type cat diskconfig.sh and press Enter. Was your RAID addition to the diskconfig.sh shell script removed? 9. At the command prompt, type cd and press Enter to return to your home directory. Next, type git clone /shellscripts and press Enter to clone your local / shellscripts repo to your home directory. Next, type cd shellscripts and press Enter to switch to your cloned repo. Finally, type ls -a and press Enter to verify that your cloned repo contains the same contents as the original repo. 10. At the command prompt, type git branch and press Enter. What is the default branch called? Next, type git checkout -b AddRAID and press Enter to create a branch called AddRAID to your cloned repo. Finally, type git branch and press Enter to verify that your AddRAID branch was added. How can you tell that your AddRAID branch is the active branch in the output? 11. At the command prompt, type vi diskconfig.sh and press Enter. Add the following lines to the bottom of the diskconfig.sh file. When finished, save and quit the vi editor. echo -e " RAID Configuration: " >>$FILENAME.report mdadm --detail /dev/md0 >>$FILENAME.report 12. At the command prompt, type git add * and press Enter to add your shell scripts to the index within your AddRAID branch. Finally, type git commit -m "Added RAID to diskconfig.sh" and press Enter to create a commit within your AddRAID branch that represents your change. 13. At the command prompt, type cat diskconfig.sh and press Enter and note that your RAID modification is shown. Next, type git checkout master and press Enter to switch back to the master branch of your cloned repo. Finally, type cat diskconfig. sh and press Enter. Is your RAID modification visible in the master branch? 14. At the command prompt, type git push origin AddRAID and press Enter to push your AddRAID branch to the original repo. Next, type cd /shellscripts and press Enter to switch your current directory to the original repo. Finally type git branch and press Enter to verify that the branch was pushed successfully to the original repo from the cloned repo. Also note that your current branch in the original repo is still set to master. 15. At the command prompt, type git merge AddRAID and press Enter to merge the changes from the AddRAID branch to your master branch. Next, type cat diskconfig.sh and press Enter. Is your modification visible in the master branch? 16. At the command prompt, type cd ~/shellscripts and press Enter to switch your cloned repo in your home directory. Next, type git pull origin master and press Enter to pull a new copy of the master branch from your original repo. Was the pull successful?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started