The start of a new journey – Enspiral Dev Academy

logoEnspiralDevAcademy

This week marks the start of Phase 0 of Enspiral Dev Academy for me. Have a look at their website to find out what it is all about, in short though I am learning to code! By the end of the bootcamp in early July I will be a whizz! (or at least a junior whizz!).

I’m in the Roa (think this means long / tall) cohort, doing Ruby and in Week 1 of Phase 0. I have learnt about the terminal, Git and GitHub so far. I had dabbled with Git and GitHub when I attended a RailsGirls Wgtn weekend in March 2014 but have never really done anything in the terminal. It has been exciting and scary installing things through the command line. I had visions of completely mucking up my computer. Thankfully that hasn’t happened….yet!

In Git I have created repos, forked them, cloned, branched  and I am enjoying learning how to do this stuff. We have also used GitHub Pages to upload our personal website. Today I decided I wanted to work on my personal site but starting with a mobile version. So instead of working on the master branch I created a mobile_site branch and was working on this. I then had the thought “but how do I view in Chrome what I am changing in my mobile_site branch?”. As a branch doesn’t make a copy that you can access via the Finder on a Mac (I think it is hidden and if it is I don’t know how to find it). I discovered through my playing on the terminal and opening up the index page from the Finder (the only index page for this project – which is where I was getting confused as having made another branch there are kind of two copies), that when I am in the mobile_site branch and I open the index.html page in Chrome (from the Finder), it will open up the version of the branch I am in within the terminal. Even if the terminal is closed, as long as when I exited it, the branch I was in was the mobile_site, then that is the page I will see in Chrome. Which I find pretty cool, as I assumed that it would be the page from the master branch. But I guess in a way that is what version control is all about. And just to make sure I understood what was happening, I changed branches a few times and checked what page came up in Chrome – low and beyond, when I was on the master branch my original page, with no changes from my mobile_site page, showed! I (strangely) find this quite exciting!

I also have the luxury of having an (old) iMac at home and having a MacBook Pro. I have been using both of them which means that I want to keep everything up to date on each device. So am getting a lot of practice at using Git. Early today I did some work on my website (on the laptop), on the mobile_site branch. I then pushed it up to GitHub and proceeded to pull it down to my iMac. However, with a git pull (I have just discovered) it pulls it down and merges it. So when I pulled it didn’t make a mobile_site branch for me and it merged into the master branch the changes I had made in the mobile_site branch. This is not what I wanted. Did a bit of searching online and found this guide to git.

Screen Shot 2015-03-04 at 3.04.07 pm

It has really clear and simple explanations of all the commands plus some visuals. And it talks about the working directory, index and HEAD – the three trees in Git. Kind of helps make sense of how Git works. I was also able to figure out the difference between a git pull and a git fetch and used a git reset to get my repo working the same way it is on my laptop. I am very pleased about that.

My personal website isn’t very interesting or exciting yet but it will be great to see how it develops over the next few weeks. Screenshot from today:

Screen Shot 2015-03-04 at 3.16.03 pm

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s