cd
into the <yourname>-simple-website/
folder and open the directory in sublime as well.
cd ~/Development/<yourname>-simple-website
subl .
Run git status
to make sure the repository is “clean” (i.e. there are no “untracked files”, “unstaged changes”, or “staged changes”).
Run git pull
to ensure you have the latest changes in the repository.
teal-website
.
Add the following to the top of styles/styles.css
body {
background: teal;
}
git diff
to ensure that you only modified that one thing and nothing else.Check out the master
branch
orange-website
.
Add the following to the top of styles/styles.css
body {
background: orange;
}
git diff
to ensure that you only modified that one thing and nothing else.Merge the orange-website
pull request. Try to merge the teal-website
pull request and it should say the branch cannot be automatically merged. This mean’s there is a merge conflict.
black-website
.
Add the following to the top of styles/styles.css
body {
background: black;
}
git diff
to ensure that you only modified that one thing and nothing else.cd
into your universe repository
Make sure the repository is clean and you are in the master branch.
Create a branch called alternative-facts
.
master
branch.
git checkout master
mars.txt
: “Mars has polar ice caps.” and “Mars is a little more than half the size of earth.”master
.alternative-facts
branch.
git checkout alternative-facts
mars.txt
. “Mars is gaseous.” and “Mars is double the size of earth.”alternative-facts
.alternative-facts
.Get into your teams.
demo-website
master
branch as the sourceEveryone should clone the empty repository.
git clone git@github.com:XXXXX/demo-website.git
The product owner should create an index.html
and a page called our-team/index.html
. Commit and push this change directly to the master
branch.
Here is a sample index.html
:
<!DOCTYPE html>
<html>
<head>
<title>Demo Website</title>
</head>
<body>
<h1>Our Demonstration Website</h1>
<a href='our-team/index.html'>Learn more about our team</a>
</body>
</html>
Here is a sample our-team/index.html
:
<!DOCTYPE html>
<html>
<head>
<title>Demo Website</title>
</head>
<body>
<h1>About Us!</h1>
</body>
</html>
Everyone else should pull these changes.
git pull
All team members, should create branches titled add-member-<name>
.
For example a team might have add-member-rachel
, add-member-monica
, add-member-phoebe
, etc.
our-team/<name>.html
. For example, I would create our-team/dhrumil.html
. Add some basic information about yourself to this page. Be sure to only create this one file - there should be no other changes to the repository. It’s important to keep your code changes isolated when working with git to avoid unecessary merge conflicts.
The product owner should create links to each of these individal pages back into the our-team/index.html
.
<!DOCTYPE html>
<html>
<head>
<title>Demo Website</title>
</head>
<body>
<h1>About Us!</h1>
<ul>
<li><a href="our-team/rachel.html">Rachel</a></li>
<li><a href="our-team/monica.html">Monica</a></li>
<li><a href="our-team/phoebe.html">Phoebe</a></li>
<li><a href="our-team/joey.html">Joey</a></li>
<li><a href="our-team/chandler.html">Chandler</a></li>
<li><a href="our-team/ross.html">Ross</a></li>
</ul>
</body>
</html>
All team members should checkout the master branch and pull the latest code.
git checkout master
git pull
Your repository and website should look something like this: