|Matteo Cypriani 81b60c133a [git] shellcheck, minor changes||11 months ago|
|README.md||1 year ago|
|git-changelog||11 months ago|
|git-cherry-move||11 months ago|
|git-merge-ff-only||11 months ago|
|git-tag-update||11 months ago|
The scripts in this directory are designed to be installed as new git
sub-commands. To do so, install the scripts in a directory within your
(or add the repository’s
bin directory to your
PATH, see the main
README.md), and use
git config to add aliases:
git config --global alias.changelog "\!sh -c 'git-changelog'" git config --global alias.cherry-move "\!sh -c 'git-cherry-move'" git config --global alias.merge-ff-only "\!sh -c 'git-merge-ff-only'" git config --global alias.tag-update "\!sh -c 'git-tag-update'"
git-changelog allows one to build a changelog file from the tag messages. The
tags considered are those whose names follow the format
example v1.2, v0.0.1, v18.104.22.168, etc.).
One can edit the options into the script to change the message displayed at the top of the changelog, and the number of lines that will separate two tag messages.
The changelog is displayed on the standard output, in reverse order (higher version numbers first), whereas the error output displays the included or skipped tag names (i.e. those that don’t correspond to the pattern).
Note that if there is no tag at all in the repository, no particular warning will be displayed.
git-cherry-move is like
git cherry-pick, but it moves the commit instead of
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.
git-cherry-move source_branch destination_branch [ reset-arg ]
reset-arg is passed as the first argument of
reset, so please be careful!
So to move the last commit of
source_branch on top of
git-cherry-move source_branch destination_branch
After this, you will be on
source_branch, the HEAD being on the parent of the
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
git-cherry-move source_branch destination_branch --hard
git-merge-ff-only main_branch topic_branch is the equivalent of the following
git checkout main_branch && git merge --ff-only topic_branch
main_branch is not checked out. The reference is updated directly
(if possible), and HEAD stays on whichever branch was checked out before
running the command.
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 whoever is the current author.
You can change it temporarily with
git config if you need to update commits
with different authors.