diff --git a/assets/javascripts/navigation.js b/assets/javascripts/navigation.js new file mode 100644 index 00000000..456df262 --- /dev/null +++ b/assets/javascripts/navigation.js @@ -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; + } + } +}); diff --git a/layout/chapter_template.html b/layout/chapter_template.html index ee59c1d9..98b1e58d 100644 --- a/layout/chapter_template.html +++ b/layout/chapter_template.html @@ -11,6 +11,8 @@ + +
diff --git a/text/07_Normal_Workflow/0_ Normal_Workflow.markdown b/text/07_Normal_Workflow/0_ Normal_Workflow.markdown index abddef62..8e95b612 100644 --- a/text/07_Normal_Workflow/0_ Normal_Workflow.markdown +++ b/text/07_Normal_Workflow/0_ Normal_Workflow.markdown @@ -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 @@ -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") \ No newline at end of file +[gitcast:c2_normal_workflow]("GitCast #2: Normal Workflow") diff --git a/text/09_Reviewing_History_Git_Log/0_ Reviewing_History_Git_Log.markdown b/text/09_Reviewing_History_Git_Log/0_ Reviewing_History_Git_Log.markdown index 7cb7c12d..369acbe9 100644 --- a/text/09_Reviewing_History_Git_Log/0_ Reviewing_History_Git_Log.markdown +++ b/text/09_Reviewing_History_Git_Log/0_ Reviewing_History_Git_Log.markdown @@ -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: diff --git a/text/14_Interactive_Rebasing/0_ Interactive_Rebasing.markdown b/text/14_Interactive_Rebasing/0_ Interactive_Rebasing.markdown index defcc336..4e91b958 100644 --- a/text/14_Interactive_Rebasing/0_ Interactive_Rebasing.markdown +++ b/text/14_Interactive_Rebasing/0_ Interactive_Rebasing.markdown @@ -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. @@ -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. diff --git a/text/31_Git_Hooks/0_ Git_Hooks.markdown b/text/31_Git_Hooks/0_ Git_Hooks.markdown index e4104506..4bcfb893 100755 --- a/text/31_Git_Hooks/0_ Git_Hooks.markdown +++ b/text/31_Git_Hooks/0_ Git_Hooks.markdown @@ -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: -