Skip to content

Commit

Permalink
add cleanup script
Browse files Browse the repository at this point in the history
This gets rid of unwanted files in a repository.
  • Loading branch information
greg0ire committed Jan 13, 2015
1 parent 5847b8f commit 4228ba0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cleanup-2-x-x-mess.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions docs/upgrade/2-to-3.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

0 comments on commit 4228ba0

Please sign in to comment.