Monday, October 26, 2015

Day 3

Terminal and Git


Sorry for the late posts! Met up with Allen from my cohort today at the Regional Library. I worked on Terminal and Git for the longest time. The assignments weren't hard but for some reason I just couldn't understand how to do them that quickly. I think the weirdest part about Terminal is that you have to tell it exactly what to do and which directory to do it from. It was pretty annoying to have to change my directory all the time so I can change into the correct folders. For example, when I create a directory on my desktop and enter it, I can't just change into another directory, I have to go up one level (in this case, back to my desktop) and change into another directory that's a child of desktop.

That might sound really confusing to some, and maybe I'm just not explaining it well but think of it like branches (which ironically was another part I got stuck on in Git), you can't jump from skinny branches to another skinny branch parallel to it, you have to retrace your steps to a thicker trunk and then go into another smaller branch. I don't know if I made it more complicated but there it is!

Using Git and GitHub was interesting...and since we have been taught how to use terminal I decided to use terminal for the last assignment. What I ingrained in myself today is that process to do anything with a file in a local repository and how to export it (or push) into my GitHub account. 
  1. Always stage the file via git add . or git add file.extension
  2. Then git commit -m "initial commit"
  3. Make changes.
  4. Repeat step 1-2.
That was the easy part..the confusing part for me was the last assignment when I had to clone a copy from GitHub, add then commit, then create a branch, enter that branch, make changes, then re-add and re-commit. Then finally push it out into GitHub. I spent FOUR HOURS on this assignment and the stupid thing is the very first step that I didn't do; I didn't freaking FORK the file. I was so confused why I couldn't add my edited file into the GitHub repository, re-did the assignment probably 20 times. I guess the only good thing that came out of it is that I have since became very comfortable using Terminal and Git...but the next unit is going to be jQuery so I'll update about that next!

No comments:

Post a Comment