commit 591e29bdb268f841d2c61209ebf5dbdda940f6c5 parent a0d63bf4b982804e4e28e07c9f71a419ff779ccb Author: sin <sin@2f30.org> Date: Thu, 27 Jun 2013 19:09:09 +0100 Add git format-patch and git am usage Diffstat:
M | simple-git | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/simple-git b/simple-git @@ -110,6 +110,17 @@ To change the contents of your last commit: $ git add <files> $ git commit --amend +To generate git patch files: + + $ git format-patch -1 + + This will generate the patch file for the last commit. You + can use git format-patch -<n> for the last `n' commits. + +To apply a git patch file: + + $ git am mypatch.patch + For a simple workflow you can avoid using the staging area completely. Just use the -am option for git-commit(1) so you can stage and commit everything in one step.