Permissions, Ownership and Git

Last week I focused on:

  • Expanding my knowledge of the command line interface (CLI)
  • Learning the basics of git.

If you use a Mac computer, accessing the CLI is easy. First you have to activate your terminal.

  1. Press Command + Spacebar: This brings up spotlight search
  2. Type the word Terminal into the search bar
  3. Press Enter

It is easy as 1-2-3 and now you are ready to learn how to use your CLI to navigate through your computer’s file structure. Once you are ready, I recommend the following YouTube videos:

Last week I worked through the Command Line Basics video #3 which is all about file permission and ownership. Basically I learned to tell who owns a file and what they are allowed to do with that file (or directory.) This video taught me the following commands:

  • chmod– allows you to change the permission on a file or directory
  • chown– allows you to change the ownership of a file or directory
  • sudo– allows you to temporarily elevate your own authorization on the command line

After strengthening my command line chops, I focused exclusively on learning the basics of git.

Git is difficult to explain, but I love a challenge.

Imagine that there are many programmers on a team working collaboratively on a website. They need a way to make individual changes to the site without stepping on each other’s toes. They also need a way to monitor the history of all the changes that were made to the site overtime. Finally they need a way to access each other’s code to make improvements. Git does all of that effortlessly. It is a distributed version control system. Which means that it exists to help programmers manage the many different versions of a project that they accumulate over time. Nothing is lost with git, rather a snapshot of each step of the project is saved in a repository that the programmers can access at anytime.

To learn more about Git, I recommend the following resource:

  • Try Git – this is a free course from codeschool. I have to warn you though, you will get addicted like me and end up paying the $29 a month to access the rest of the code school lessons on Git and more. I am crazy about code school. It is really a great resource.

So far, I have learned the following commands in Git:

  • git init: this creates a local repository for my files
  • git status: I type this one all the time. It helps me know what is going on with my files
  • git add: This adds a file to the “staging area.”
  • git commit –m: This actually commits my file to the repository and adds it to the overall timeline
  • git log: shows a record of my commits

That was a lot of ground to cover in one week. Next week I plan to delve even deeper in to Git. I will be starting Git Level 2 on the code school website. Check back next week to see what I learned in level 2!


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s