2012-11-03 19:15:55 +01:00
|
|
|
# git-changelog #
|
|
|
|
|
|
|
|
git-changelog allows one to build a changelog file from the tag
|
|
|
|
messages. The tags considered are those whose names follow the format
|
|
|
|
vX.Y[.Z[...]] (for example v1.2, v0.0.1, v4.3.2.1, etc.).
|
|
|
|
|
|
|
|
One can edit the options into the script to change the message displayed
|
|
|
|
at the top of the changelog, and the number of line to separate two tag
|
|
|
|
messages.
|
|
|
|
|
|
|
|
The changelog is displayed on the standard output, in revese order
|
|
|
|
(higher version numbers first), whereas the error output displays the
|
|
|
|
included or skipped tag names (i.e. those which do not correspond to the
|
|
|
|
pattern).
|
|
|
|
|
|
|
|
Note that if there is no tag at all in the repository, no particular
|
|
|
|
warning will be displayed.
|
|
|
|
|
|
|
|
You can make this script a Git command by putting it in a directory
|
|
|
|
within your PATH (e.g. /usr/local/bin) and add an alias in your Git
|
|
|
|
configuration:
|
|
|
|
|
|
|
|
git config --global alias.changelog "\!sh -c 'git-changelog'"
|
|
|
|
|
|
|
|
|
2011-07-01 15:33:36 +02:00
|
|
|
# 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'"
|
2012-02-08 19:00:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
# 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'"
|
2012-11-03 19:31:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
# git-tag-update #
|
|
|
|
|
|
|
|
git-tag-update allows one to update a tag message while automatically
|
|
|
|
keeping its original date. It takes the name of the tag to update as an
|
|
|
|
argument.
|
|
|
|
|
|
|
|
Beware that the tag's author will be changed to whatever is the current
|
|
|
|
author. You can change it temporarily with git config if you need to
|
|
|
|
update commits with different authors.
|
|
|
|
|
|
|
|
To activate the git tag-update command, put the git-tag-update script in
|
|
|
|
a directory in the PATH (for instance /usr/local/bin) and add an alias:
|
|
|
|
|
|
|
|
git config --global alias.tag-update "\!sh -c 'git-tag-update'"
|