Github repo confusion

Last week, I accidentally cloned down the wrong repo from GitHub. Whoops! I forked the repo for one of our class assignments, but I grabbed the URL for the MakerSquare repo, not mine. Fortunately, there was Google to the rescue!

Turns out, this is actually a little bit easy, though I read through the first 5 or so google search results before I did anything. This blog post was the most helpful because the commands were explained very nicely. It probably also helped that it was the 4th or so thing I read, so I was beginning to understand what I needed to do.

I did the following:

1. Check the current remote to make sure it is actually what I think it is

git origin -v

2. Remove the current origin

git remote rm origin

3. Add the new (correct!) origin

git remote add origin

And tah-dah! All fixed! And in even nicer news, there is actually an even easier way of doing this that might be newer than said blog post. On GitHub Help, there is some information about using

git remote set-url

to do the same thing as the above step 3 and allows you to skip step 2 entirely.

Since this was an early mistake in a very simple single-branch repo, I didn’t have to take any other steps to make sure the HEAD was in the right spot or that any changes were correctly synced.

Day 2: Arrays vs Hashes

Here is a quick rundown on the difference between arrays and hashes! This is a pretty basic overview.


The array is basically a list of values or items separated by commas. (CSV! My favorite data format!) Arrays are pretty straightforward.

Array = [ “a cool string”, 5, “another cool string”, “word”, 19983578923485]

Key facts about arrays:

  • Denoted by square brackets [  ]
  • Values are separated by commas [ value1, value2]
  • Order matters!
  • Access individual items via their index. ex: Array[0] gives the first item in the array.


Hashes are cool! (And not just because they wear bowties.) A hash looks a little bit like an array, but with different brackets and each position in a hash is made up of a pair of things instead of a single item. The left side of the pair is called the key and the right side is the value. As in, it is KEY to remember the KEY otherwise you will not be able to access the VALUE. Also, the order of items in the array does not matter, because instead of looking up things by their position or index, we look up values in an array by their key.

Hash = { “pumpkin pie” => “is delicious”, 42 => “life the universe and everything”, :dog => “cute!”, nailpolish: “green” }

Key facts about hashes:

  • Denoted by curly brackets { }
  • Key/values pairs are separated by commas { hash1: key1, hash2: key2 } (new syntax) OR { hash1 => key1, hash2 => key2 } (old syntax)
  • Order doesn’t matter!
  • Access individual items via their key. ex: Hash[“key”]
  • That little equals-greater-than symbol that ties the key and value together? It is called a hash rocket! => => =>
  • Can contain symbols as keys! Those are the guys that are either start (or sometimes end with) a colon.


Today, I am very thankful that I have ‘previous experience’ using the command line. Turns out, I need to stop underestimating how much I know, because turns out, I remember quite a lot! Which was really useful, because today, we jumped right in to learning about git and github, and I think I understand! No longer do I have mysterious incantations or un-remember-able commands. I (mostly) know what I’m doing with basic Git commands. And I’m comfortable typing stuff into the command line, and even more comfortable when I know what it is supposed to do. As part of our exercise today, we wrote up a nice little ‘git cheat sheet’, which will really come in handy while I get more practice using git.

I’m also really pleased that ‘writing webpages in Notepad in college’ translates really well into ‘I remember how to do this’ when doing our beginning HTML and CSS work. Thanks, past self! You did good!

I also learned a valuable lesson in making sure you have scrolled alllllll the way down to the bottom of the documentation for the thing you are having trouble with, because there might be some help all the way down there at the bottom. I’m not sure if I could have fixed my problem with the boxen install with that knowledge, but when I saw that today, I definitely had a bit of a ‘d’oh’ moment. Lessons learned all around.

Development Environment: Ready!

The folks at MakerSquare have recommended OSX for the course, and I had an exciting time getting everything updated and installed. I ran into a few problems getting set up, but thankfully, none of them were at all un-fixable, though I still have a lingering  error message I keep seeing every time I open Terminal. However, it can wait until tomorrow, and this seems like the sort of situation likely to get me into trouble if I try to mess with it myself. I have at least enough knowledge to get me into trouble, so it seems the best plan to wait until I have some experts in my immediate vicinity. My familiarity with the command line in OS X is largely from a class on phylogenetic analysis, which is to say I was largely typing in things as written on a worksheet or projected from the instructors computer at the front of the room, so there is a lot I know I don’t know.

I’m excited to learn about the tools I’ve installed. All my previous experience has been with the vanilla terminal, but it looks like we have some interesting things! So far I’m really enjoying SizeUp. I’ve been working with Windows 7 at work, and I really enjoy the automatic window resizing, so bringing that to the Mac is pretty great! I don’t know if I’ve been this excited for a first day of school in a long time!