Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.93 KB

lab4.md

File metadata and controls

60 lines (38 loc) · 1.93 KB

Hey, Back for even more? Today we're going to learn how to use VIM and github thru the bash terminal.


Step 1: Logging into IENG6

First you're going to want to ssh into the ieng6 server. Keys Pressed: ssh [email protected] <enter> yourpassword <enter> This logs into ieng6 using ssh.

Image

Step 2: Cloning Lab 7 repo

Keys Pressed: git clone <ctrl+v> <enter> as I had https://github.com/l1joseph/lab7 copied to my clipboard allowing me to more quickly create a clone of the repo.

Image

Step 3: Running Tests(Fail)

Keys Pressed: bash t <tab> <enter> to autocomplete to bash test.sh which runs the test script, and shows that tests fail.

Image

Step 4: Editing Code

Keys Pressed: vim L <tab> . <tab> <enter> This is to enter vim editor for ListExamples.java, resulting terminal input should be vim ListExamples.java and hit enter. Assuming that your cursor is at top of test when entering vim: 42j e r 2 :wq These commands first move cursor down 42 lines, then to the end of the first word on that line using e. Next r is for replace, where we're replacing 1 with 2. :wq saves changes to file and quits vim.

Image

Before & After:

Image

Image

Step 5: Running Tests(Fail)

Keys Pressed: bash t <tab> <enter> to autocomplete to bash test.sh which runs the test script, and shows that tests pass now.

Image

Step 6: Pushing to Github.

Keys Pressed: git add L <tab> .java <enter> The resulting input should correspond to git add ListExamples.java git commit -m "Updated Bug" <enter> This is the commit message, where you update the repo with your changes. git push origin This should ask you to enter your github username and password, pressing <enter> after each to authorize push.

Image