File Manipulation with Command Line and Git

Base

Read the instructions by clicking the button above. 👆

OR

Check out the commits by clicking the button below. 👇

Launch
Description

Instructions

  1. Create a folder in the command line
  2. Inside the folder, create a text file in the command line and open it in VSCode.
  3. Write a haiku about trees in the text file and save the file. A haiku is a Japanese poem that follows the convention of 5 syllables, 7 syllables, and 5 syllables on each of 3 lines respectively.
  4. Create a Git repo in the folder, then add and commit the poetry file.
  5. Edit the poem to reference leaves and make a commit for the changes.
  6. Add a second poem about winter in another file and commit the file.
  7. Add "papaya" to the last line of the winter file, but don't keep the change
  8. Add a title to the haiku about trees above the haiku in the file then change the filename to reflect the title. Note that we can change more than one file, and only stage the files related to the haiku on trees for commit. Do not stage or commit the winter poem.
  9. Delete the poem about winter from the repo by deleting the file and committing the change.

File Manipulation Commands

  • mkdir: Creates a directory (folder)
  • touch: Creates an empty file
  • mv <current file name> <new file name>: Renames a file
  • rm <file to be deleted>: Deletes the file

Git Commands

  • git init: Creates a local repository
  • git add: Stages a file for commit
  • git commit -m "<Description about commit>": Commits a change