From daa4aab6361d0421880a22cda4820bf660fee7c0 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 1 Jul 2011 15:33:36 +0200 Subject: [PATCH] [git] Add README --- git/README | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 git/README diff --git a/git/README b/git/README new file mode 100644 index 0000000..8fbf75f --- /dev/null +++ b/git/README @@ -0,0 +1,30 @@ +# git-cherry-move # + +git-cherry-move is like git cherry-pick, but it moves the commit +instead of copying it. + +It is designed to move a single commit from a branch head to another +branch head. It is the equivalent of git cherry-pick followed by git +reset. + +Usage: + git-cherry-move source_branch destination_branch [ reset-arg ] + +reset-arg is passed as the first argument of reset, so pleas be careful! + +To move the last commit of source_branch on top of destination_branch, +you can type the following: + git-cherry-move source_branch destination_branch +After this, you will be on source_branch, the HEAD being on the parent +of the old source_branch head. The changes introduced by the moved +commit are not deleted from the file system (soft reset). + +If you want these changes to be deleted (hard reset), use --hard as the +*last* argument: + git-cherry-move source_branch destination_branch --hard + +To activate the git cherry-move command, put the git-cherry-move script +in a directory in the PATH (for instance /usr/local/bin) and add an +alias: + + git config --global alias.cherry-move "\!sh -c 'git-cherry-move'"