Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While I'm reading your book... #37

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
22 changes: 22 additions & 0 deletions assets/javascripts/navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$(document).keydown(function(ev) {
if (ev.keyCode == 37) {
if ($("div.nav a").size() === 2) {
window.location = $(".nav:first-child a").attr('href');
return false;
}
else if ($("div.nav a").size() === 1 && $("div.nav a:first").text().toLowerCase().indexOf("prev") !== -1 ) {
window.location = $("div.nav a:first").attr('href');
return false;
}
}
else if (ev.keyCode == 39) {
if ($("div.nav a").size() === 2) {
window.location = $("div.nav a:last").attr('href');
return false;
}
else if ($("div.nav a").size() === 1 && $("div.nav a:first").text().toLowerCase().indexOf("next") !== -1) {
window.location = $("div.nav a:first").attr('href');
return false;
}
}
});
2 changes: 2 additions & 0 deletions layout/chapter_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!--[if IE]><link rel="stylesheet" href="assets/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<link rel="stylesheet" href="assets/stylesheets/mac_classic.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="assets/stylesheets/style.css" type="text/css" media="screen, projection">
<script type="text/javascript" src="assets/javascripts/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="assets/javascripts/navigation.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions text/07_Normal_Workflow/0_ Normal_Workflow.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Alternatively, instead of running `git add` beforehand, you can use
which will automatically notice any modified (but not new) files, add
them to the index, and commit, all in one step.

A note on commit messages: Though not required, it's a good idea to
A note on commit messages: though not required, it's a good idea to
begin the commit message with a single short (less than 50 character)
line summarizing the change, followed by a blank line and then a more
thorough description. Tools that turn commits into email, for
Expand All @@ -55,4 +55,4 @@ and newly modified files, and in both cases it takes a snapshot of the
given files and stages that content in the index, ready for inclusion in
the next commit.

[gitcast:c2_normal_workflow]("GitCast #2: Normal Workflow")
[gitcast:c2_normal_workflow]("GitCast #2: Normal Workflow")
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ can also make more specific requests:
$ git log fs/ # commits that modify any file under fs/
$ git log -S'foo()' # commits that add or remove any file data
# matching the string 'foo()'
$ git log --no-merges # dont show merge commits
$ git log --no-merges # don't show merge commits

And of course you can combine all of these; the following finds
commits since v2.5 which touch the Makefile or any file under fs:
Expand Down
6 changes: 3 additions & 3 deletions text/14_Interactive_Rebasing/0_ Interactive_Rebasing.markdown
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interactive Rebasing ##

You can also rebase interactively. This is often used to re-write your
own commit objects before pusing them somewhere. It is an easy way to
own commit objects before pushing them somewhere. It is an easy way to
split, merge or re-order commits before sharing them with others. You
can also use it to clean up commits you've pulled from someone when
applying them locally.
Expand Down Expand Up @@ -111,9 +111,9 @@ the rebase dropped you to the command line :

$ git reset HEAD^
$ git add file1
$ git commit 'first part of split commit'
$ git commit -m 'first part of split commit'
$ git add file2
$ git commit 'second part of split commit'
$ git commit -m 'second part of split commit'
$ git rebase --continue

And now instead of 5 commits, you would have 6.
Expand Down
2 changes: 1 addition & 1 deletion text/31_Git_Hooks/0_ Git_Hooks.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ This hook executes once for the receive operation. It takes no
arguments, but for each ref to be updated it receives on standard
input a line of the format:

<old-value> SP <new-value> SP <ref-name> LF
<old-value> SP <new-value> SP <ref-name> LF

where `<old-value>` is the old object name stored in the ref,
`<new-value>` is the new object name to be stored in the ref and
Expand Down