Black Codher Unit 1 - Command Line & Git assessment
Assessment Steps
Open a terminal window and check you are in the main directory of your repository.
To capture the terminal session and all the commands entered into the terminal, enter the following command:
Term=dumb script output.txt
This will record all commands entered in to your terminal and save them to a file called output.txt.
Windows users: To record a script using the Linux script command, you will need to have the Windows Subsystem for Linux installed and Windows Terminal configured to use the Ubuntu shell.
Once the capture session has started, run through the following steps in a terminal:
- Create a directory that you will use as a local repository later on (/unit01-assessment-git)
- Create two directories inside that directory called folder1 and folder2.
- Create three files called file1.txt, file2.txt and file3.txt.
- Move file1.txt into the folder1 directory.
- Move file2.txt into the folder2 directory.
- Change directory by navigating to folder1.
- List the current directory files and folders.
- In folder1, confirm the present working directory.
- Navigate back to the parent directory and delete the file file3.txt.
- To end the session, type exit into the terminal window.
- Move output.txt file from root directory to folder in step 1.
- Initialse the folder you created in step 1.
- Use"git add ..." to include in what will be committed to remote repository. > git add folder1 folder2 output.txt
- Use git commit -m "adding folder 1, 2 & output.txt to main" to commit your modified files & attach a commit message
- Use git remote add origin https://github.com/MarieObi/black-codher.git to set up your remote repo & connect your local repo to it.
- Always use git status to check your progress in the gitflow
- Use git push -u origin main to push your local content (local repo) to your remote repo (Github).
- Input your Github UN & PW when requested and view your files in your repo hosted on Github.