Skip to content

Instantly share code, notes, and snippets.

@jueyang
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jueyang/6f5c8ea82f5d0193f032 to your computer and use it in GitHub Desktop.
Save jueyang/6f5c8ea82f5d0193f032 to your computer and use it in GitHub Desktop.

Week 2. Learning curve ascends. When is this going to end? This anguish of sweating through a system that seems so vast, so unforgiving. You read the error message: error, failure,fatal; and you hate computers. You want to go back to the good old days when things were not just a bit, but a whole lot, simpler. Heck, even Excel seems intuitive compared to this. git commit. Why would someone use the word commit when they don't mean it. The world is so strange, and all you want to do is speak plain English and have a good laugh.

Just take a moment to remember the time when you were learning a new word. You read it in a novel and dog-earred the page. "Petulant," no idea what that was. Some British smart. But you kept reading. You had patience with the author, although the lanuage could be difficult at times. But the moment clicked, half way through the novel, and now you would not even admit your thought of dismissing it.

With that in mind, let's learn some vocabularies for git. I know, I probably need a stronger segue. But see, I am trying to get better at writing, and the only way to do it, is to write, to practice often and be patient.

Real talk. Here's a visual explanation for what we did in week 2: git add, git commit, and git push. The three methods correspond with three four respective spaces in your workflow: your local directory, the staging area, and, the local repository, and the remote repository.

  1. git add: add changes from your local directory to a staging area. You can visually see and make the changes in your local directory, but you can't see this staging area when you add something to it; it does not have a corresponding user interface.
  2. git commit: capsulate your changes within the staging area to your local repository. Again, this is an invisible process, and nothing is live on GitHub
  3. git push: push your local repository to your remote repository. You can then visually see it on GitHub's interface.

You have seen a few words thrown around -- directory, staging, repository (or repo), remote, origin, master -- hope you have gained some insight for the first three. We will be using this workflow towards the end of the term, and I will try to live perform around the whiteboard some of these concepts the next time I see you.

Give the novel some patience and it will make sense to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment