Skip to content

Commit

Permalink
finished the undo chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed Feb 11, 2009
1 parent 08159e2 commit b6bce8f
Show file tree
Hide file tree
Showing 13 changed files with 287 additions and 15 deletions.
14 changes: 7 additions & 7 deletions episodes.yaml
Expand Up @@ -39,12 +39,7 @@ episodes:
projects or specific files within your project.

- section: Intermediate
values:
- name: Undoing
page: undoing
desc: Revert, unmodify or unstage a file or project state
at any point.

values:
- name: Distributed Workflows
desc: Fetch, merge, pull and push between multiple remote
repositories.
Expand All @@ -63,7 +58,12 @@ episodes:
- name: Interactive Adding
desc: Stage and unstage changes to files or partial files
with an interactive Git tool.


- name: Undoing
page: undoing
desc: Revert, unmodify or unstage a file or project state
at any point.

- name: Amending Commits
desc: Change the latest commit message, or redo the last commit
by adding or removing files from it.
Expand Down
Binary file added images/undo/step1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/undo/step2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/undo/step3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/undo/topic2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/undo/topic3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/undo/topic4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -67,7 +67,7 @@ <h1>Welcome to the GitHub Learning site</h1>
<hr/>
</div>

<div class="span-5"><h2>Beginner</h2><div class='episode'><b><a href="p/intro.html">Introduction To Git</a></b><p>What Git is, why you would want to use it and where to get it and learn about it.</p></div><div class='episode'><b><a href="p/setup.html">Setup and Initialization</a></b><p>Setup your Git environment, then create a new Git repository and clone an existing one.</p></div><div class='episode'><b><a href="p/normal.html">Normal Workflow</a></b><p>Syncronize with a remote repository, make changes, then stage and commit them.</p></div><div class='episode'><b><a href="p/branching.html">Basic Branching and Merging</a></b><p>Create and work on topic and long running branches, merge between them and delete them.</p></div><div class='episode'><b><a href="p/tagging.html">Git Tagging</a></b><p>Create signed, unsigned or lightweight tags to permanantly mark important points in your project history.</p></div><div class='episode'><b><a href="p/log.html">Git Log</a></b><p>Browse your project history, find specific commits and visualize the branching and merging actions.</p></div><div class='episode'><b><a href="p/diff.html">Git Diff</a></b><p>Show differences between different versions of your projects or specific files within your project.</p></div></div><div class="span-5"><h2>Intermediate</h2><div class='episode'><b><a href="p/undoing.html">Undoing</a></b><p>Revert, unmodify or unstage a file or project state at any point.</p></div><div class='episode'><b>Distributed Workflows</b><p>Fetch, merge, pull and push between multiple remote repositories.</p></div><div class='episode'><b><a href="p/rebasing.html">Rebasing</a></b><p>Replay changes from one branch onto another branch to preserve a linear history.</p></div><div class='episode'><b><a href="p/stashing.html">Stashing</a></b><p>Temporarily save changes to your working directory and staging area without having to commit, then reapply the changes later.</p></div><div class='episode'><b>Interactive Adding</b><p>Stage and unstage changes to files or partial files with an interactive Git tool.</p></div><div class='episode'><b>Amending Commits</b><p>Change the latest commit message, or redo the last commit by adding or removing files from it.</p></div><div class='episode'><b>Interactive Rebasing</b><p>Rebase multiple files interactively, squashing, reordering or amending commits in between.</p></div><div class='episode'><b>Customizing Git</b><p>Setup aliases for common commands and other personal options in Git - autocompletion, bash branch, colors and more.</p></div></div><div class="span-5"><h2>Advanced</h2><div class='episode'><b>Filter Branch</b><p>Modify large sections of your commit history at once, changing emails, names or files globally.</p></div><div class='episode'><b>Maintaining Git</b><p>Learn the fsck and gc commands to diagnose problems and keep your repository small.</p></div><div class='episode'><b>The Git Reflog</b><p>Browse the history of your local references even if they're not referenced anywhere else anymore.</p></div><div class='episode'><b>Data Recovery</b><p>Find lost commits or branches and restore them, or recover from partial database corruption.</p></div><div class='episode'><b>Git Hooks</b><p>Learn the client and server side pre and post action hooks and some useful example scripts to use with them.</p></div><div class='episode'><b>Revision Selection</b><p>Selecting individual commits or ranges of commits using helpful Git shorthands.</p></div><div class='episode'><b>Git Internals</b><p>Explore the internal workings of Git - the different object types and how to view the raw data via several useful plumbing commands.</p></div><div class='episode'><b>Git Submodules</b><p>Submodule usage and other tips for keeping subprojects in your Git repository.</p></div></div><div class="span-6 last"><h2>Special Interest</h2><div class='episode'><b>Git and Windows - General</b><p>Install and use Git on a Windows environment using the default mSysGit tools.</p></div><div class='episode'><b>Git and Windows - Extensions</b><p>Installing and using the Git Extensions shell extensions tools on Windows.</p></div><div class='episode'><b>Git and Subversion</b><p>Using the git-svn client with a Subversion server. Specifically for existing SVN users, how Git is a better Subversion client than Subversion.</p></div><div class='episode'><b>Migrating from Subversion</b><p>Ready to move your project from Subversion? A few ways to do the migration, from hosted services to really custom methods.</p></div><div class='episode'><b>Git and Textmate</b><p>Using Git and GitHub from Textmate using the TM Git bundle.</p></div><div class='episode'><b>Git and Capistrano</b><p>Deploying Git projects using the Capistrano deployment tool, including how to deploy from GitHub.</p></div></div>
<div class="span-5"><h2>Beginner</h2><div class='episode'><b><a href="p/intro.html">Introduction To Git</a></b><p>What Git is, why you would want to use it and where to get it and learn about it.</p></div><div class='episode'><b><a href="p/setup.html">Setup and Initialization</a></b><p>Setup your Git environment, then create a new Git repository and clone an existing one.</p></div><div class='episode'><b><a href="p/normal.html">Normal Workflow</a></b><p>Syncronize with a remote repository, make changes, then stage and commit them.</p></div><div class='episode'><b><a href="p/branching.html">Basic Branching and Merging</a></b><p>Create and work on topic and long running branches, merge between them and delete them.</p></div><div class='episode'><b><a href="p/tagging.html">Git Tagging</a></b><p>Create signed, unsigned or lightweight tags to permanantly mark important points in your project history.</p></div><div class='episode'><b><a href="p/log.html">Git Log</a></b><p>Browse your project history, find specific commits and visualize the branching and merging actions.</p></div><div class='episode'><b><a href="p/diff.html">Git Diff</a></b><p>Show differences between different versions of your projects or specific files within your project.</p></div></div><div class="span-5"><h2>Intermediate</h2><div class='episode'><b>Distributed Workflows</b><p>Fetch, merge, pull and push between multiple remote repositories.</p></div><div class='episode'><b><a href="p/rebasing.html">Rebasing</a></b><p>Replay changes from one branch onto another branch to preserve a linear history.</p></div><div class='episode'><b><a href="p/stashing.html">Stashing</a></b><p>Temporarily save changes to your working directory and staging area without having to commit, then reapply the changes later.</p></div><div class='episode'><b>Interactive Adding</b><p>Stage and unstage changes to files or partial files with an interactive Git tool.</p></div><div class='episode'><b><a href="p/undoing.html">Undoing</a></b><p>Revert, unmodify or unstage a file or project state at any point.</p></div><div class='episode'><b>Amending Commits</b><p>Change the latest commit message, or redo the last commit by adding or removing files from it.</p></div><div class='episode'><b>Interactive Rebasing</b><p>Rebase multiple files interactively, squashing, reordering or amending commits in between.</p></div><div class='episode'><b>Customizing Git</b><p>Setup aliases for common commands and other personal options in Git - autocompletion, bash branch, colors and more.</p></div></div><div class="span-5"><h2>Advanced</h2><div class='episode'><b>Filter Branch</b><p>Modify large sections of your commit history at once, changing emails, names or files globally.</p></div><div class='episode'><b>Maintaining Git</b><p>Learn the fsck and gc commands to diagnose problems and keep your repository small.</p></div><div class='episode'><b>The Git Reflog</b><p>Browse the history of your local references even if they're not referenced anywhere else anymore.</p></div><div class='episode'><b>Data Recovery</b><p>Find lost commits or branches and restore them, or recover from partial database corruption.</p></div><div class='episode'><b>Git Hooks</b><p>Learn the client and server side pre and post action hooks and some useful example scripts to use with them.</p></div><div class='episode'><b>Revision Selection</b><p>Selecting individual commits or ranges of commits using helpful Git shorthands.</p></div><div class='episode'><b>Git Internals</b><p>Explore the internal workings of Git - the different object types and how to view the raw data via several useful plumbing commands.</p></div><div class='episode'><b>Git Submodules</b><p>Submodule usage and other tips for keeping subprojects in your Git repository.</p></div></div><div class="span-6 last"><h2>Special Interest</h2><div class='episode'><b>Git and Windows - General</b><p>Install and use Git on a Windows environment using the default mSysGit tools.</p></div><div class='episode'><b>Git and Windows - Extensions</b><p>Installing and using the Git Extensions shell extensions tools on Windows.</p></div><div class='episode'><b>Git and Subversion</b><p>Using the git-svn client with a Subversion server. Specifically for existing SVN users, how Git is a better Subversion client than Subversion.</p></div><div class='episode'><b>Migrating from Subversion</b><p>Ready to move your project from Subversion? A few ways to do the migration, from hosted services to really custom methods.</p></div><div class='episode'><b>Git and Textmate</b><p>Using Git and GitHub from Textmate using the TM Git bundle.</p></div><div class='episode'><b>Git and Capistrano</b><p>Deploying Git projects using the Capistrano deployment tool, including how to deploy from GitHub.</p></div></div>

<div id="footer" class="span-21">
<div class="info span-12">
Expand Down
2 changes: 1 addition & 1 deletion p/diff.html
Expand Up @@ -236,7 +236,7 @@ <h3 id='what_a_merge_would_introduce'>what a merge would introduce</h3>

<pre><code>$ git diff ...(branch)</code></pre>

<p>Where (branch) is the name of the branch you&#8217;re considering merging.</p><br/><br/><hr/></div><div class="span-10"><a href="log.html">&laquo; previous</a></div><div style="text-align:right" class="span-11 last"><a href="undoing.html">next &raquo;</a></div><div class="span-21 last">&nbsp;</div><hr/>
<p>Where (branch) is the name of the branch you&#8217;re considering merging.</p><br/><br/><hr/></div><div class="span-10"><a href="log.html">&laquo; previous</a></div><div style="text-align:right" class="span-11 last"><a href="rebasing.html">next &raquo;</a></div><div class="span-21 last">&nbsp;</div><hr/>
</div>

<div id="footer" class="span-21">
Expand Down
2 changes: 1 addition & 1 deletion p/rebasing.html
Expand Up @@ -128,7 +128,7 @@ <h2 id='do_not_rebase_commits_that_you_have_pushed_to_a_public_repository'>&#822

<p>When you rebase stuff, you are abandoning existing commits and creating new ones that are similar but still different. That means that if you push commits somewhere that others can pull them down and base work off of them, then you rewrite those commits and push them up again, you collaborators will have to re-merge their work again and things will get messy when you try to pull thier work back into yours.</p>

<p>If you treat rebase as a way to clean up and work with commits <em>before</em> you push them, and only ever rebase commits that have never been available publicly, then you&#8217;ll be living the sweet life.</p><br/><br/><hr/></div><div class="span-10"><a href="undoing.html">&laquo; previous</a></div><div style="text-align:right" class="span-11 last"><a href="stashing.html">next &raquo;</a></div><div class="span-21 last">&nbsp;</div><hr/>
<p>If you treat rebase as a way to clean up and work with commits <em>before</em> you push them, and only ever rebase commits that have never been available publicly, then you&#8217;ll be living the sweet life.</p><br/><br/><hr/></div><div class="span-10"><a href="diff.html">&laquo; previous</a></div><div style="text-align:right" class="span-11 last"><a href="stashing.html">next &raquo;</a></div><div class="span-21 last">&nbsp;</div><hr/>
</div>

<div id="footer" class="span-21">
Expand Down
2 changes: 1 addition & 1 deletion p/stashing.html
Expand Up @@ -42,7 +42,7 @@ <h1>Stashing</h1>
</div>

<div class="content">
<div class="span-21"><hr/><br/><br/><hr/></div><div class="span-10"><a href="rebasing.html">&laquo; previous</a></div><div class="span-21 last">&nbsp;</div><hr/>
<div class="span-21"><hr/><br/><br/><hr/></div><div class="span-10"><a href="rebasing.html">&laquo; previous</a></div><div style="text-align:right" class="span-11 last"><a href="undoing.html">next &raquo;</a></div><div class="span-21 last">&nbsp;</div><hr/>
</div>

<div id="footer" class="span-21">
Expand Down

0 comments on commit b6bce8f

Please sign in to comment.