diff --git a/cleanup-2-x-x-mess.sh b/cleanup-2-x-x-mess.sh new file mode 100755 index 0000000..af922a0 --- /dev/null +++ b/cleanup-2-x-x-mess.sh @@ -0,0 +1,12 @@ +#!/bin/bash -eu +main() +{ + local templateDir=$(git config --get --path init.templatedir) + + if [ ! -d .git ] + then + echo "This script is supposed to be run at the root of a git repository" >&2 + fi + rm -rf .git/tests .git/docs .git/mkdocs.yml .git/README.md .git/LICENSE .git/CONTRIBUTING.md .git/update.sh +} +main diff --git a/docs/upgrade/2-to-3.md b/docs/upgrade/2-to-3.md index 46cd068..a7066eb 100644 --- a/docs/upgrade/2-to-3.md +++ b/docs/upgrade/2-to-3.md @@ -1,5 +1,7 @@ # Upgrading from 2.x.x to 3.x.x +## Changing the template directory + There is just a little change between 2 and 3, it is the location of the template directory. It is no longer the root in the project, but a sub-directory named… `template`. Why this change ? Because even if the update script can ignore the @@ -14,3 +16,11 @@ To change that, upgrade to 3.x.x, and adjust your `init.templatedir` variable: After that you will be able to safely run the update script from any project you have. + +## Cleaning up repositories + +If you do not like the mess I have created in your repositories, please: + +- accept my sincerest apologies +- run the cleanup script I wrote: `/path/to/.git_template/cleanup-2-x-x-mess.sh` +from the root of each repository you want to clean.