scripts/git
Matteo Cypriani 6c5525185c [git] Add git-merge-ff-only 2012-02-08 19:00:47 +01:00
..
README [git] Add git-merge-ff-only 2012-02-08 19:00:47 +01:00
git-cherry-move [git] cherry-move: use plumbing to list branches 2011-07-01 15:52:05 +02:00
git-merge-ff-only [git] Add git-merge-ff-only 2012-02-08 19:00:47 +01:00

README

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


# git-merge-ff-only #

git-merge-ff-only main_branch topic_branch is the equivalent of the
following commands:

 git checkout main_branch && git merge --ff-only topic_branch

except that main_branch is not checked out. The reference is updated
directly (if possible), and HEAD stays on whatever branch was checked
out before running the command.

To activate the git merge-ff-only command, put the git-merge-ff-only
script in a directory in the PATH (for instance /usr/local/bin) and
add an alias:

 git config --global alias.merge-ff-only "\!sh -c 'git-merge-ff-only'"