diff --git a/README.md b/README.md index 754f212..0b24317 100644 --- a/README.md +++ b/README.md @@ -19,39 +19,42 @@ For clarity's sake all examples in this document use a customized bash prompt in **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [I wrote the wrong thing in a commit message](#i-wrote-the-wrong-thing-in-a-commit-message) -- [I need to add staged changes to the previous commit](#i-need-to-add-staged-changes-to-the-previous-commit) - - [I tried to push my amended commit to a remote, but I got an error message](#i-tried-to-push-my-amended-commit-to-a-remote-but-i-got-an-error-message) - - [I rebased, but I don't want to force push.](#i-rebased-but-i-dont-want-to-force-push) -- [I need to combine commits](#i-need-to-combine-commits) - - [Possible issues with merging](#possible-issues-with-merging) - - [Safe merging strategy:](#safe-merging-strategy) - - [I need to merge a branch into a single commit](#i-need-to-merge-a-branch-into-a-single-commit) - - [I want to combine only unpushed commits](#i-want-to-combine-only-unpushed-commits) - - [Possible issues with interactive rebases](#possible-issues-with-interactive-rebases) - - [The rebase editing screen says 'noop'](#the-rebase-editing-screen-says-noop) - - [There were conflicts](#there-were-conflicts) -- [I committed with the wrong name and email configured](#i-committed-with-the-wrong-name-and-email-configured) -- [I committed to master instead of a new branch](#i-committed-to-master-instead-of-a-new-branch) -- [I made several commits on a single branch that should be on different branches](#i-made-several-commits-on-a-single-branch-that-should-be-on-different-branches) -- [I want to add aliases for some git commands](#i-want-to-add-aliases-for-some-git-commands) -- [I pulled from/into the wrong branch](#i-pulled-frominto-the-wrong-branch) -- [I want to discard local commits so my branch is the same as one on the server](#i-want-to-discard-local-commits-so-my-branch-is-the-same-as-one-on-the-server) -- [I want to discard my local, uncommitted changes](#i-want-to-discard-my-local-uncommitted-changes) -- [I want to move my unstaged edits to a new branch](#i-want-to-move-my-unstaged-edits-to-a-new-branch) -- [I want to move my unstaged edits to a different, existing branch](#i-want-to-move-my-unstaged-edits-to-a-different-existing-branch) -- [What did I just do?](#what-did-i-just-do) -- [I want to add changes in one file to two different commits](#i-want-to-add-changes-in-one-file-to-two-different-commits) -- [I want to remove a file from git but keep the file](#i-want-to-remove-a-file-from-git-but-keep-the-file) -- [Clone all submodules](#clone-all-submodules) -- [Deleting Objects](#deleting-objects) - - [I want to delete local branches that were deleted upstream](#i-want-to-delete-local-branches-that-were-deleted-upstream) - - [I accidentally deleted my branch](#i-accidentally-deleted-my-branch) - - [Delete/remove last pushed commit](#deleteremove-last-pushed-commit) - - [Delete/remove last local commit](#deleteremove-last-local-commit) - - [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit) - - [Delete tag](#delete-tag) -- [Deleted Patch](#deleted-patch) + - [I wrote the wrong thing in a commit message](#i-wrote-the-wrong-thing-in-a-commit-message) + - [I need to add staged changes to the previous commit](#i-need-to-add-staged-changes-to-the-previous-commit) + - [I tried to push my amended commit to a remote, but I got an error message](#i-tried-to-push-my-amended-commit-to-a-remote-but-i-got-an-error-message) + - [I rebased, but I don't want to force push.](#i-rebased-but-i-dont-want-to-force-push) + - [I need to combine commits](#i-need-to-combine-commits) + - [Possible issues with merging](#possible-issues-with-merging) + - [Safe merging strategy:](#safe-merging-strategy) + - [I need to merge a branch into a single commit](#i-need-to-merge-a-branch-into-a-single-commit) + - [I want to combine only unpushed commits](#i-want-to-combine-only-unpushed-commits) + - [Possible issues with interactive rebases](#possible-issues-with-interactive-rebases) + - [The rebase editing screen says 'noop'](#the-rebase-editing-screen-says-noop) + - [There were conflicts](#there-were-conflicts) + - [I committed with the wrong name and email configured](#i-committed-with-the-wrong-name-and-email-configured) + - [I committed to master instead of a new branch](#i-committed-to-master-instead-of-a-new-branch) + - [I made several commits on a single branch that should be on different branches](#i-made-several-commits-on-a-single-branch-that-should-be-on-different-branches) + - [I want to add aliases for some git commands](#i-want-to-add-aliases-for-some-git-commands) + - [I pulled from/into the wrong branch](#i-pulled-frominto-the-wrong-branch) + - [I want to discard local commits so my branch is the same as one on the server](#i-want-to-discard-local-commits-so-my-branch-is-the-same-as-one-on-the-server) + - [I want to discard my local, uncommitted changes](#i-want-to-discard-my-local-uncommitted-changes) + - [I want to move my unstaged edits to a new branch](#i-want-to-move-my-unstaged-edits-to-a-new-branch) + - [I want to move my unstaged edits to a different, existing branch](#i-want-to-move-my-unstaged-edits-to-a-different-existing-branch) + - [What did I just do?](#what-did-i-just-do) + - [I want to add changes in one file to two different commits](#i-want-to-add-changes-in-one-file-to-two-different-commits) + - [I want to remove a file from git but keep the file](#i-want-to-remove-a-file-from-git-but-keep-the-file) + - [Clone all submodules](#clone-all-submodules) + - [Deleting Objects](#deleting-objects) + - [I want to delete local branches that were deleted upstream](#i-want-to-delete-local-branches-that-were-deleted-upstream) + - [I accidentally deleted my branch](#i-accidentally-deleted-my-branch) + - [Delete/remove last pushed commit](#deleteremove-last-pushed-commit) + - [Delete/remove last local commit](#deleteremove-last-local-commit) + - [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit) + - [Delete tag](#delete-tag) + - [Deleted Patch](#deleted-patch) +- [Other Resources](#other-resources) + - [Tutorials](#tutorials) + - [Scripts & Tools](#scripts-&-tools) @@ -645,7 +648,7 @@ If someone has sent you a pull request on GitHub, but then deleted their origina After commiting, change the author of the previous commit. To do this, see how to [change author](#commit-wrong-author). Then, apply whatever changes needed on to, and make a new pull request. -# Other resources +# Other Resources ## Tutorials