Skip to content

Commit

Permalink
html files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Jul 5, 2014
1 parent f64c426 commit 40817a1
Show file tree
Hide file tree
Showing 14 changed files with 625 additions and 0 deletions.
60 changes: 60 additions & 0 deletions html/branches_arent_just_for_birds_problem.html
@@ -0,0 +1,60 @@
<p> Create a new branch for your contribution.</p>
<hr>
<p> Git repositories use branches to isolate work when needed. It&#39;s
common practice when working on a project or with others on a
project to create a {bold}branch{/bold} to put your changes in. This
way you can do your work while the main, commonly named &#39;master&#39;,
branch stays stable.</p>
<p> {cyan}GitHub Pages{/cyan}</p>
<p> GitHub.com will automatically serve and host static website files in
branches named &#39;gh-pages&#39;. Since the project you forked creates a
website, its main branch is &#39;gh-pages&#39;. All sites like this can be
found using this pattern for the URL: </p>
<p> <a href="http://githubusername.github.io/repositoryname">http://githubusername.github.io/repositoryname</a></p>
<p> {bold}{cyan}
Create a branch{/bold}
---------------{/cyan}</p>
<p> When you create a branch, Git copies everything from the current
branch you&#39;re on and places it in the branch you&#39;ve requested.</p>
<p> Type <code>git status</code> to see what branch you&#39;re currently on (it
should be &#39;gh-pages&#39;)</p>
<p> Create a branch and name it &quot;add-<username>&quot;, where &#39;username&#39; is
your username. For instance, &quot;add-jlord&quot;. </p>
<p> $ git branch <BRANCHNAME></p>
<p> Now you have a branch with a new name identical to &#39;gh-pages&#39;.</p>
<p> To go into that branch and work on it, similar to using <code>cd</code> to
change directory in terminal, you {bold}checkout{/bold} a branch.</p>
<p> $ git checkout <BRANCHNAME></p>
<p> {bold}{cyan}
Create a new file{/bold}
--------------------------{/cyan}</p>
<p> Back to the text editor. In the &#39;contributors&#39; folder, create a
new file named &quot;add-<username>.txt&quot;, where &#39;username&#39; is your
username. For instance, &quot;add-jlord.txt&quot;. Then, just write your
GitHub username in it, that&#39;s it and that&#39;s all. For instance,
I&#39;d type &#39;jlord&#39; and hit save. </p>
<p> {bold}{cyan}
Check-in{/bold}
--------{/cyan}</p>
<p> Go through the steps for checking in a project: </p>
<p> $ git status
$ git add <filename>
$ git commit -m &quot;commit message&quot;</p>
<p> Now push your update to your fork on GitHub:</p>
<p> $ git push origin <BRANCHNAME></p>
<p> Type <code>git-it verify</code> when you&#39;re done.</p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> You can create and switch to a branch in one line:</p>
<p> $ git checkout -b <BRANCHNAME></p>
<p> Create a new branch:</p>
<p> $ git branch <BRANCHNAME></p>
<p> Move onto a branch:</p>
<p> $ git checkout <BRANCHNAME></p>
<p> List the branches:</p>
<p> $ git branch</p>
<p> Rename a branch you&#39;re currently on:</p>
<p> $ git branch -m <NEWBRANCHNAME></p>
<p> Verify what branch you&#39;re working on</p>
<p> $ git status{/cyan}</p>
<hr>
46 changes: 46 additions & 0 deletions html/commit_to_it_problem.html
@@ -0,0 +1,46 @@
<p> Create a file in your new repository, add something to that file and
commit those changes to Git.</p>
<hr>
<p> Now that you&#39;ve got a repository started, add a file to it. </p>
<p> {bold}{cyan}
New File{/bold}
--------{/cyan}</p>
<p> Open a text editor. Now write a couple of lines of text, perhaps
describe the tastiest sandwich you can imagine, and save the
file as <code>readme.md</code> in the folder you created in the last lesson.</p>
<p> {bold}{cyan}
Check, Add and Commit Changes{/bold}
-----------------------------{/cyan}</p>
<p> Next check the {bold}status{/bold} of your repository. Below in this terminal,
you should still be within the new folder you created. See if there
are changes listed:</p>
<p> $ git status</p>
<p> Then {bold}add{/bold} the file you just created to the files you&#39;d
like to {bold}commit{/bold} (aka save) to change. </p>
<p> $ git add readme.md</p>
<p> Finally, {bold}commit{/bold} those changes to the repository&#39;s history with a
short description of the updates. See the command hints below!</p>
<p> $ git commit -m &quot;your commit message&quot;</p>
<p> {bold}{cyan}
Make More Changes{/bold}
-----------------------------{/cyan}</p>
<p> Now add another line to <code>readme.md</code>, perhaps a title, and save.</p>
<p> In terminal, you can view the {bold}diff{/bold}erence between the
file now and how it was at your last commit. </p>
<p> $ git diff</p>
<p> Now with what you just learned above, commit this latest change.</p>
<p> When all changes are committed, run <code>git-it verify</code>.</p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> {bold}Check status of changes to a repository{/bold}</p>
<p> $ git status</p>
<p> {bold}View changes to files{/bold}</p>
<p> $ git diff</p>
<p> {bold}Add a file&#39;s changes to be committed{/bold}</p>
<p> $ git add <FILENAME></p>
<p> {bold}To add all files&#39; changes{/bold}</p>
<p> $ git add .</p>
<p> {bold}To commit (aka save) the changes you&#39;ve added with a short
message describing the changes{/bold}</p>
<p> $ git commit -m &quot;your commit message&quot;{/cyan}</p>
<hr>
50 changes: 50 additions & 0 deletions html/forks_and_clones_problem.html
@@ -0,0 +1,50 @@
<p> Fork a project from GitHub.com and clone it locally.</p>
<hr>
<p> Now you&#39;ve made a project locally and pushed it to GitHub, but that&#39;s
only half the fun. The other half is working with other people and
projects.</p>
<p> When you {bold}fork{/bold} a repository, you&#39;re creating a copy of it on
your GitHub.com account. Forks are used for creating your own
version of a project or contributing back fixes or features to the
original project. </p>
<p> Once a project is forked, you then {bold}clone{/bold} (aka copy) it from
GitHub to your computer to work on locally.</p>
<p> {bold}{cyan}
Fork{/bold}
----{/cyan}</p>
<p> The project we&#39;ll work with is {bold}www.github.com/jlord/patchwork{/bold}. Go
to that site and click the fork button at the top right. Once the
fork animation is complete, you&#39;ve got a copy on your account. Copy
your fork&#39;s HTTP URL on the right side.</p>
<p> {bold}{cyan}
Clone a Repository{/bold}
-------------------{/cyan}</p>
<p> Now, in terminal, clone the repository. It will create a new folder
for the repository so no need to create one. But make sure you aren&#39;t
cloning it inside of another Git repository folder! So, if you&#39;re still
inside of the repository you created in the early challenges,
back out of that folder: <code>cd ..</code></p>
<p> $ git clone <URL></p>
<p> Navigate into that folder (in this case, named &#39;patchwork&#39;)</p>
<p> $ cd patchwork</p>
<p> Now you&#39;ve got a copy of the repository on your computer and it is
automatically connected to the remote repository (your forked copy)
on your GitHub account.</p>
<p> {bold}{cyan}
Connect to the Original Repository{/bold}
----------------------------------{/cyan}</p>
<p> But what if the original repository you forked changes? You&#39;ll want
to be able to {bold}pull{/bold} in those changes too. So let&#39;s add a remote
connection to the original, {bold}github.com/jlord/patchwork{/bold}, repository
with its URL, found on the right hand side of the original on GitHub.</p>
<p> You can name this remote connection anything you want, but often
people use &#39;upstream&#39;, let&#39;s use that for this.</p>
<p> $ git remote add upstream <a href="https://github.com/jlord/patchwork.git">https://github.com/jlord/patchwork.git</a></p>
<p> When you&#39;ve done these steps, run <code>git-it verify</code>.</p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> {bold}Add remote connections{/bold}</p>
<p> $ git remote add <REMOTENAME> <URL></p>
<p> {bold}View remote connections{/bold}</p>
<p> $ git remote -v{/cyan}</p>
<hr>
46 changes: 46 additions & 0 deletions html/get_git_problem.html
@@ -0,0 +1,46 @@
<p> Install Git.</p>
<hr>
<p> {bold}{cyan}
Get Git{/bold}
--------{/cyan}</p>
<p> Git is {bold}open source software{/bold} (free for anyone to use) written
by Linus Torvalds who also wrote the Linux operating system. </p>
<p> It is a program for keeping track of changes over time, known in
programming as {bold}version control{/bold}.</p>
<p> {cyan}To install Git{/cyan}</p>
<ul>
<li><p>Windows: It&#39;s recommended to download GitHub for Windows,
which includes Git and has an easier install:
{bold}windows.github.com{/bold}.</p>
</li>
<li><p>Mac: You can also download GitHub for Mac, which includes
Git, {bold}mac.github.com{/bold} (from Preferences, select
the command line tools install), or Git by itself:
{bold}<a href="http://git-scm.com/downloads{/bold}">http://git-scm.com/downloads{/bold}</a>.</p>
</li>
<li><p>Follow the installation instructions.</p>
<p>Git isn&#39;t like other programs on your computer. You&#39;ll likely not
see an icon on your desktop, but it will always be available to you
and you&#39;ll be able to access it at anytime from your
terminal (which you&#39;re in right now!) or Git desktop applications.</p>
<p>Once it is installed, open terminal (aka Bash, aka Shell, aka Prompt).
You can verify that it&#39;s really there by typing:</p>
<p>$ git --version </p>
<p>This will return the version of Git that you&#39;re running.</p>
<p>Next, configure Git so it knows who to associate your changes to:</p>
<p>Set your name:</p>
<p>$ git config --global user.name &quot;Your Name&quot;</p>
<p>Now set your email:</p>
<p>$ git config --global user.email youremail@example.com</p>
<p>When you&#39;re done type into terminal:</p>
<p>$ git-it verify </p>
<p>PRO TIP: Dollar signs are often used in programming documentation
to signify that the line is command line code. You don&#39;t actually
type it in, though, only type <code>git-it verify</code>.</p>
<p>When you finish each challenge, type <code>git-it</code> to see the menu and
go to the next challenge. Some of the challenges are longer than the
screen, so don&#39;t forget to scroll up to where it begins after it
loads!</p>
</li>
</ul>
<hr>
25 changes: 25 additions & 0 deletions html/githubbin_problem.html
@@ -0,0 +1,25 @@
<p> Configure Git and GitHub.</p>
<hr>
<p> The repository you&#39;ve created so far is just on your computer, which
is handy, but makes it pretty hard to share and work with others on.
No worries, that&#39;s what GitHub.com is for! In this challenge,
get Git and GitHub configured.</p>
<p> {bold}{cyan}
Create a GitHub Account{/bold}
-----------------------{/cyan}</p>
<p> GitHub is a website that allows people everywhere to share what
they&#39;re working on with Git and to easily work together.</p>
<ul>
<li>Visit {bold}<a href="http://www.github.com{/bold}">http://www.github.com{/bold}</a> and sign up for a free account.</li>
<li><p>High five, welcome!</p>
<p>{bold}{cyan}
Configure Git{/bold}
-------------{/cyan}</p>
<p>You can also add your GitHub username to your Git configuration,
which will be needed in order to verify the upcoming challenges:</p>
<p>Add your GitHub username to your configuration:</p>
<p>$ git config --global user.username githubusername</p>
<p>When you&#39;ve set everything up, run <code>git-it verify</code></p>
</li>
</ul>
<hr>
29 changes: 29 additions & 0 deletions html/its_a_small_world_problem.html
@@ -0,0 +1,29 @@
<p> Add a collaborator.</p>
<hr>
<p> Working with others is one of the best things about GitHub because
it makes it easy to work from all over the world at any time.</p>
<p> {cyan}Collaborators{/cyan}</p>
<p> {bold}Collaborators{/bold} are other GitHub users who are given permission to
make edits to a repository owned by someone else. To add
{bold}collaborators{/bold} to a project, visit the repository&#39;s GitHub page
and click the &#39;Settings&#39; icon on the right side menu. Then select the
&#39;Collaborators&#39; tab. Type in the username to add and click &#39;Add&#39;.</p>
<p> {bold}{cyan}
Hello, Repo Robot!{/bold}
------------------{/cyan}</p>
<p> Go to the your forked Patchwork repository&#39;s page on GitHub and
add &#39;reporobot&#39; as a collaborator.</p>
<p> {bold}<a href="http://www.github.com/yourusername/patchwork/settings/collaboration{/bold}">http://www.github.com/yourusername/patchwork/settings/collaboration{/bold}</a></p>
<p> When you&#39;ve added Reporobot as a collaborator to your Patchwork fork,
run <code>git-it verify</code>. </p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> {bold}Pull in changes from a remote{/bold}</p>
<p> $ git pull <REMOTENAME> <BRANCH></p>
<p> {bold}Copy a repository to your computer{/bold}</p>
<p> $ git clone <URL></p>
<p> {bold}Add remote connections{/bold}</p>
<p> $ git remote add <REMOTENAME> <URL></p>
<p> {bold}View remote connections{/bold}</p>
<p> $ git remote -v{/cyan}</p>
<hr>
45 changes: 45 additions & 0 deletions html/merge_tada_problem.html
@@ -0,0 +1,45 @@
<p> Merge branch, tidy up and pull upstream for much win!</p>
<hr>
<p> Your pull request is being merged! But meanwhile, since you
know that you definitely want those updates in your forked version,
and your branch is in good working order, merge it into the main
branch on your forked repository, in this case, <code>gh-pages</code>.</p>
<p> {bold}{cyan}
Merge a branch{/bold}
--------------{/cyan}</p>
<p> First, move into the branch you want to merge <em>into</em> (in this case,
branch <code>gh-pages</code>).</p>
<p> $ git checkout <BRANCHNAME></p>
<p> Now tell Git what branch you want to merge in (in this case,
your feature branch that begins with &quot;add-&quot;).</p>
<p> $ git merge <BRANCHNAME></p>
<p> Tidy up by deleting your feature branch now that it has been merged.</p>
<p> $ git branch -D <BRANCHNAME></p>
<p> You can also delete the branch from your fork on GitHub:</p>
<p> $ git push <REMOTENAME> --delete <BRANCHNAME></p>
<p> {bold}{cyan}
Congratulations!{/bold}
----------------{/cyan}</p>
<p> You&#39;ve created local repositories, remote repositories, worked with
a collaborator, pushed, pulled and joined the millions of others
developing and enriching open source!</p>
<p> Visit {bold}jlord.github.io/patchwork{/bold} to see your changes incorporated!</p>
<p> And last but not least, if you pull in updates from the original
(since it now shows you on the home page) you&#39;ll be up to date
and have a version too, live at: yourusername.github.io/patchwork. </p>
<p> $ git pull upstream gh-pages</p>
<p> When you&#39;ve merged your branch, deleted it and pulled from the
original, run <code>git-it verify</code>.</p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> {bold}Merge a branch into current branch{/bold}</p>
<p> $ git merge <BRANCHNAME></p>
<p> {bold}Change the branch you&#39;re working on{/bold}</p>
<p> $ git checkout <BRANCHNAME></p>
<p> {bold}Delete a local branch{/bold}</p>
<p> $ git branch -D <BRANCHNAME></p>
<p> {bold}Delete a remote branch{/bold}</p>
<p> $ git push <REMOTENAME> --delete <BRANCHNAME></p>
<p> {bold}Pull from a remote branch{/bold}</p>
<p> $ git pull <REMOTENAME> <BRANCHNAME>{/cyan}</p>
<hr>
27 changes: 27 additions & 0 deletions html/pull_never_out_of_date_problem.html
@@ -0,0 +1,27 @@
<p> Keep your file up to date, pull in changes from collaborators.</p>
<hr>
<p> If you&#39;re working on something with someone you need to stay up
to date with the latest version. So you&#39;ll want to {bold}pull{/bold} in any
changes that may have been made.</p>
<p> {bold}{cyan}
Pull in Changes{/bold}
-----------------{/cyan}</p>
<p> See if Reporobot has made any changes to your &#39;add-&#39; branch by pulling
in from the remote named &#39;origin&#39; on GitHub:</p>
<p> $ git pull <REMOTENAME> <BRANCHNAME></p>
<p> If nothing&#39;s changed, it will tell you &#39;Already up-to-date&#39;.
If there are changes, it will merge those changes into your local
version.</p>
<p> Did Reporobot make changes? Git tells you where changes were made.
You can open that file and see Reporobot&#39;s updates. Surprise,
Reporobot is an artist!</p>
<p> When you&#39;ve pulled, type <code>git-it verify</code>.</p>
<p> {cyan}</p>
<h2 id="-git-tips-"> <strong>GIT TIPS</strong></h2>
<p> {bold}Check Git status{/bold}</p>
<p> $ git status</p>
<p> {bold}Pull in changes from a remote branch{/bold}</p>
<p> $ git pull <REMOTENAME> <REMOTEBRANCH></p>
<p> {bold}See changes to the remote before you pull in{/bold}</p>
<p> $ git fetch --dry-run{/cyan}</p>
<hr>

0 comments on commit 40817a1

Please sign in to comment.