-
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. -
Create a branch called
teal-website
.-
Add the following to the top of
styles/styles.css
body { background: teal; }
-
Use
git diff
to ensure that you only modified that one thing and nothing else. -
Commit this change to the branch.
-
Push the branch.
-
Create a pull request but do not merge it.
-
-
Check out the
master
branch -
Create a new branch called
orange-website
.-
Add the following to the top of
styles/styles.css
body { background: orange; }
-
Use
git diff
to ensure that you only modified that one thing and nothing else. -
Commit this change to the branch.
-
Push the branch.
-
Create a pull request but do not merge it.
-
-
Merge the
orange-website
pull request. Try to merge theteal-website
pull request and it should say the branch cannot be automatically merged. This mean's there is a merge conflict. -
Create a branch called
black-website
.-
Add the following to the top of
styles/styles.css
body { background: black; }
-
Use
git diff
to ensure that you only modified that one thing and nothing else. -
Commit this change to the branch.
-
Push the branch.
-
Do not merge this branch, we're going to throw away these changes
-
-
cd
into your universe repository -
Make sure the repository is clean and you are in the master branch.
-
Create a branch called
alternative-facts
. -
Go back to the
master
branch.git checkout master
- Add two facts to
mars.txt
: "Mars has polar ice caps." and "Mars is a little more than half the size of earth." - Commit these changes to
master
.
-
Go back to the
alternative-facts
branch.git checkout alternative-facts
- Add two facts to
mars.txt
. "Mars is gaseous." and "Mars is double the size of earth." - Commit these changes to
alternative-facts
. - Create a pull request using
alternative-facts
.
-
Attempt to merge the pull request and try to resolve the merge conflicts.
-
Get into your teams.
-
The product owner should:
- create a repository under their account named
demo-website
- add the remaining team members as collaborators to the repo. this is done under the repo settings
- enable github pages on this repo with the
master
branch as the source
- create a repository under their account named
-
Everyone 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 calledour-team/index.html
. Commit and push this change directly to themaster
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. -
In this branch, each team member should create a file that is titled
our-team/<name>.html
. For example, I would createour-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.- Each member should:
- commit this change to the branch
- push it
- create a pull request
- Product owner should review and merge all of the PRs. There should be no conflicts.
- Each member should:
-
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: