[git] Add README
This commit is contained in:
parent
04100733ce
commit
daa4aab636
|
@ -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'"
|
Loading…
Reference in New Issue