Git Assignment

Due: at class on January 28

The video we saw in class washttp://www.teachmetocode.com/screencasts/5

Everyone should download git to their development machine and configure it with your name, email, and public key.

The instructions for creating a repository are in the video and the steps are also indicated on github.

Purpose: To make sure everyone understands how to use git.

Task

One person in the team will create a new repository containing a single file named index.html containing something like:

<html>
<head>
<title>Team Awesome</title>
</head>

<body>
<h1>Team Awesome</h1>

<h2>Members</h2>
<ul>
</ul>
</body>
</html>
That person will also add team members to the repository. All team members will create git hub accounts, check out the repository, add an html file named after themselves. They will modify index.html by adding their name and a link to their page. Then they will will commit their changes to the repository. The result will be something likeĀ this example

Demo

Through the git hub interface you will show that everyone in the team made the necessary commits.

Summary of git recipes

to add new file to project repository or update a changed file

Let's say the file you want to add is registration.php. The file exists and you are in the directory of that file.

git add registration.php
git commit -m “Added stub file for registration”
git push origin master

Note: The first time you do this you should set the origin:

git remote add origin git@github.com:zacharski/tester.git
Suppose you changed a file, index.php, that already exists in the repository. You can commit your changes following the same procedure as above:
git add index.php
git commit -m "Added stub file for registration"
git push origin master
If you modified a number of files then useĀ git add .

to get the latest version of the project (and merge with your own work)

git pull origin master

To tag a release with a name and checkout that release

git tag v1.0 e545be3
And to checkout that release
git checkout v1.0