Skip to content

Commit

Permalink
text edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Jan 28, 2014
1 parent eeb1154 commit 1b27374
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 81 deletions.
5 changes: 4 additions & 1 deletion help.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{cyan}{bold}
HANDY GIT AND BASH COMMANDS{/bold}{/cyan}
HELPFUL THINGS/bold}{/cyan}

- Get stuck? Find an error? File and issue at:
{bold}www.github.com/jlord/git-it{/bold}

{cyan}
GIT COMMANDS{/cyan}
Expand Down
63 changes: 36 additions & 27 deletions problems/branches_arent_just_for_birds/problem.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
Create a new branch for your contribution.

--------------------------------------------------------------------

{bold}{cyan}
Branching{/bold}
---------{/cyan}

It'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 you work while the main, commonly named 'master',
branch stays stable.

Git repositories use branches to isolate work when needed. It'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 you work while the main, commonly named 'master',
branch stays stable.

{cyan}GitHub Pages{/cyan}

Expand All @@ -21,37 +19,36 @@
http://githubusername.github.io/repositoryname

{bold}{cyan}
How to create branches{/bold}
----------------------{/cyan}
Create a branch{/bold}
---------------{/cyan}

When you create a branch, Git copies everything from the current
branch you're on and places it in the branch you've requested.

Type `git status` to see what branch you're currently on (it
should be 'gh-pages')

Create a branch and name it "add-<username>", where 'username' is
your username. For instance, "add-jlord".

$ git branch <BRANCHNAME>


Now you have a branch with a new name identical to 'gh-pages'.

To go into that branch and work on it, similar to using `cd` to
change directory in terminal, you {bold}checkout{/bold} a branch.

$ git checkout <BRANCHNAME>

{cyan}
Contribution, license and readme docs{/cyan}

Many open source projects contain contribution, license and readme
documents that let users know what they need to know about using
and contributing to the project.

{bold}{cyan}
Create branch and new file{/bold}
Create a new file{/bold}
--------------------------{/cyan}

Create a branch and name it "add-<username>", where 'username' is
your username. For instance, "add-jlord". Then move onto that branch.

Now, in the 'contributors' folder, create a new file named
"add-<username>.txt", where 'username' is your username. For instance,
"add-jlord.txt". Then, just write your GitHub username in it, that's
it and that's all. For instance, I'd type 'jlord' and hit save.
Back to the text editor. In the 'contributors' folder, create a
new file named "add-<username>.txt", where 'username' is your
username. For instance, "add-jlord.txt". Then, just write your
GitHub username in it, that's it and that's all. For instance,
I'd type 'jlord' and hit save.

{bold}{cyan}
Check-in{/bold}
Expand All @@ -63,7 +60,7 @@
$ git add <filename>
$ git commit -m "commit message"

Now push you update to GitHub:
Now push your update to your fork on GitHub:

$ git push origin <BRANCHNAME>

Expand All @@ -77,6 +74,18 @@
You can create and switch to a branch in one line:

$ git checkout -b <BRANCHNAME>

Create a new branch:

$ git branch <BRANCHNAME>

Move onto a branch:

$ git checkout <BRANCHNAME>

List the branches:

$ git branch

Rename a branch you're currently on:

Expand Down
13 changes: 8 additions & 5 deletions problems/commit_to_it/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
Check, Add and Commit Changes{/bold}
-----------------------------{/cyan}

Next check the {bold}status{/bold} of your repository. Are there changes
listed?
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:

$ git status

Expand All @@ -28,7 +29,7 @@

$ git add <FILENAME>

Finally, commit those changes to the repository's history with a
Finally, {bold}commit{/bold} those changes to the repository's history with a
short description of the updates.See the command hints below!

$ git commit -m "your commit message"
Expand All @@ -40,11 +41,13 @@
Now add another line to your .txt file, perhaps a title, and save.

In terminal, you can view the {bold}diff{/bold}erence between the
files now and how they were before you edited.
file now and how it was at your last commit.

$ git diff

Now with what you just learned above, commit that change.
Now with what you just learned above, commit this latest change.

When all changes are committed, run `git-it verify`.

{cyan}
**GIT TIPS**
Expand Down
15 changes: 7 additions & 8 deletions problems/forks_and_clones/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

$ git clone <URL>

Navigate into that folder
Navigate into that folder (in this case, named 'patchwork')

$ cd <FORKEDREPONAME>
$ cd patchwork

Now you've got a copy of the repository on your computer and it is
automatically connected to the remote repository (your forked copy)
Expand All @@ -49,16 +49,15 @@

But what if the original repository you forked changes? You'll want
to be able to {bold}pull{/bold} in those changes too. So let'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.
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.

You can name this remote connection anything you want, but often
people use 'upstream', let's use that for this.

$ git remote add upstream <HTTPURL>
$ git remote add upstream https://github.com/jlord/patchwork.git

When you've done these steps, launch this challenge in that terminal
window and type `git-it verify`.
When you've done these steps, run `git-it verify`.

{cyan}
**GIT TIPS**
Expand All @@ -70,6 +69,6 @@

{bold}View remote connections{/bold}

$ git remote -v
$ git remote -v{/cyan}

--------------------------------------------------------------------
5 changes: 5 additions & 0 deletions problems/get_git/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@
PRO TIP: Dollar signs are often used in programming documentation
to signify that the line is command line code. You don't actually
type it in, though, only type `git-it verify`.

When you finish each challenge, type `git-it` to see the menu and
go to the next challenge. Some of the challenges are longer than the
screen, so don't forget to scroll up to where it begins after it
loads!

--------------------------------------------------------------------
4 changes: 2 additions & 2 deletions problems/githubbin/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The repository you'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's what GitHub.com is for! In this challenge,
get set up.
get Git and GitHub configured.

{bold}{cyan}
Create a GitHub Account{/bold}
Expand All @@ -24,7 +24,7 @@
You'll want to let Git know who to associate the changes you make to
by telling it your name, GitHub account name and email address.

Open a new terminal {bold}(CMD + N){/bold} window and set your name:
Type these into terminal to configure Git:

$ git config --global user.name "Your Name"

Expand Down
10 changes: 6 additions & 4 deletions problems/its_a_small_world/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
{cyan}Collaborators{/cyan}

{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's GitHub page and click the
'Settings' icon on the right side menu. Then select the 'Collaborators'
tab. Type in the username to add and click 'Add'
make edits to a repository owned by someone else. To add
{bold}collaborators{/bold} to a project, visit the repository's GitHub page
and click the 'Settings' icon on the right side menu. Then select the
'Collaborators' tab. Type in the username to add and click 'Add'.

{bold}{cyan}
Hello, Repo Robot!{/bold}
Expand All @@ -20,6 +20,8 @@
Go to the your forked Patchwork repository's page on GitHub and
add 'reporobot' as a collaborator.

{bold}http://www.github.com/yourusername/patchwork{/bold}

When you've added Reporobot as a collaborator to your Patchwork fork,
run `git-it verify`.

Expand Down
4 changes: 2 additions & 2 deletions problems/merge_tada/problem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@

$ git branch -D <BRANCHNAME>

You can also delete the remote copy of it on GitHub:
You can also delete the branch from your fork on GitHub:

$ git push <REMOTENAME> --delete <BRANCHNAME>

{bold}{cyan}
Congratulations!{/bold}
----------------{/cyan}

You've create local repositories, remote repositories, worked with
You've created local repositories, remote repositories, worked with
a collaborator, pushed, pulled and joined the millions of others
developing and enriching open source!

Expand Down
20 changes: 12 additions & 8 deletions problems/pull_never_out_of_date/problem.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Keep your file up to date, pull in changes from contributors.
Keep your file up to date, pull in changes from collaborators.

--------------------------------------------------------------------

{bold}{cyan}
Pull in Changes{/bold}
-----------------{/cyan}

If you're working on something with someone you need to stay up
to date with the latest version. So you'll want to {bold}pull{/bold} in any
changes that may have been made.

{bold}{cyan}
Pull in Changes{/bold}
-----------------{/cyan}

See if Reporobot has made any changes to the 'add-' branch by pulling
See if Reporobot has made any changes to your 'add-' branch by pulling
in from the remote named 'origin' on GitHub:

$ git pull <REMOTENAME> <BRANCHNAME>
Expand All @@ -20,11 +20,11 @@
version.

Did Reporobot make changes? Git tells you where changes were made.
You can open that file and see Reporobot's updates. Suprise :)
You can open that file and see Reporobot's updates. Surprise,
Reporobot is an artist!

When you've pulled, type `git-it verify`.


{cyan}
**GIT TIPS**
------------
Expand All @@ -36,5 +36,9 @@
{bold}Pull in changes from a remote branch{/bold}

$ git pull <REMOTENAME> <REMOTEBRANCH>{/cyan}

{bold}See changes to the remote before you pull in{/bold}

$ git fetch --dry-run{/cyan}

--------------------------------------------------------------------
26 changes: 17 additions & 9 deletions problems/remote_control/problem.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
Connect your local and remote repository and sync changes.
Connect your local and remote repositories and sync changes.

--------------------------------------------------------------------

GitHub.com stores the {bold}remote{/bold} copy of your repository. By
pushing your {bold}local{/bold} (on your computer) changes to it, you keep
it up to date. That way others can always get the latest, too.
GitHub.com stores a {bold}remote{/bold} copy of your repository (it's
'remote' because that copy is not on your computer, but on a server
elsewhere). By {bold}pushing{/bold} your {bold}local{/bold} (on your computer) changes to it,
you keep it up to date. That way others can always get the latest,
too. And everyone can work on a project together without needing
access to your computer where your local copy is stored.

{bold}{cyan}
Create a Remote Repository{/bold}
--------------------------{/cyan}

You want to sync your {bold}local{/bold} version with one stored on GitHub.com
called the {bold}remote{/bold} version. So first create an empty
remote repository.
remote repository on GitHub.com.

- Go to {bold}www.github.com{/bold}, log in, and click the '+' in the top right to
create a new repository.
Expand Down Expand Up @@ -69,16 +72,21 @@

$ git pull origin master

'master' is the branch name by default.
'master' is the branch name by default. You'll learn more about
branches soon!

Now you want to {bold}push{/bold} everything you've done locally
to GitHub.

$ git push origin master

Go to GitHub and refresh the page of your repository. WOAH! Everything
is the same locally and remotely. Congrats on your first public
repository!
Go to GitHub and refresh the page of your repository. WOAH!
Everything is the same locally and remotely. Congrats on your
first public repository!

When you're synced locally and on GitHub.com, run:

$ git-it verify

{cyan}
**GIT TIPS**
Expand Down
Loading

0 comments on commit 1b27374

Please sign in to comment.