gitIntro

The intent of this lesson is to introduce you to a program known as Git and to Github, a Git-based website that is specifically designed to support projects with multiple developers. This combination is a great way to support teamwork on complex, and often remote, technical projects. One of the best features  is robust version control that helps developers avoid the loss and/or duplication of work. This lesson presents a brief and (hopefully) easy introduction into the use of these technologies.

Procedure.

  1. Visit https://desktop.github.com and install github desktop on your computer.
  2. Fire it up. If you have a Github account, login. Otherwise, create one.

  3. What I think will happen next is that github will prompt you to Authorize the desktop app, so do so.

  4.  Submit your Github username to me with this google form. 
    1. Slack the Github username to me as well.
  5. Check your email again because I will invite you to 'collaborate' on a Github repository.
  6. Click View invitation and then accept the invitation.
  7. Return to Github desktop and you will most likely see a message that says something to the effect that you have no repositories. Refresh to see the one that you just accepted.
  8. Click the clone button at the bottom. Clone it! You can clone it to the default location on your computer or to some other folder. It'll work either way.
      1. Open the repository in Brackets or some other text editor (as prompted).

        Sadly, this step may not work as advertised. If not, I recommend that you open Brackets and then select "file open folder" and browse to, and select, the otravez folder that houses the repository (inside of the documents folder).

  9. Now view the files of the repository in finder. There should be a file. named index.html and a folder of images named img. In just a bit you are going to add your image to the img folder, and then add the image and your name to the index.html file. Before this step however you need to create a new 'branch'. The reason for this step is that you have downloaded the master repository but it is bad form to make changes to the master repository during the development process. Why? Imagine that you are a small part of a big team project. Do you REALLY want to risk messing up everyone else's work?  That is why you create a branch just for your portion of the work. The branch that you are about to create will actually be a copy of the master repository.  Once you are through you will send your branch to Github and someone else (me in this case) who is running the overall project, ultimately will add your changes to the master branch.  Whew!
  10. To create the new branch, click Branch New Branch and name the branch after yourself.

    1. With the new branch selected,
      add an image of yourself that is no wider than 500px to the img folder.
    2. Name the image based on your first and last name.
    3. Use your code editor to add that image of yourself and your name to index.html.
  11. Once you have made these changes, commit them to your branch as shown below. to Github. A brief summary is required in order to activate the commit button.

  12. Now you should be prompted to publish your branch. Do so.
  13. That's it! Now visit Github.com and take a look at your branch. Open index.html in your branch and you should see your changes. Now open the same file in the master branch. The changes that you made are not there yet but will be added later.