[git] Add README

This commit is contained in:
Matteo Cypriani 2011-07-01 15:33:36 +02:00
parent 04100733ce
commit daa4aab636
1 changed files with 30 additions and 0 deletions

30
git/README Normal file
View File

@ -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'"