/cloneToCleanGitRepositories

Clone from a dirty Catchall Git repository to create clean repository for each specified versioned element :warning: Now hosted on Gitlab

Primary LanguageShellGNU General Public License v3.0GPL-3.0

⚠️ This project is now hosted on Gitlab; switch to it to get newer versions.

cloneToCleanGitRepositories version 1.1.0

Codacy Badge

This is a free tool allowing to clone from a dirty Catchall Git repository to create clean repository for each specified versioned element.

I created initially this tool after having posted a question on Stackoverflow.

This script uses my scripts-common project.

First time you clone this repository

After the first time you clone this repository, you need to initialize git submodule:

git submodule init
git submodule update

This way, scripts-common project will be available and you can use this tool.

Usage

Usage: ./cloneToCleanGitRepositories.sh <source repository> <dest root directory> <filter>
<source repository>    path to the existing catchall git repository
<dest root directory>  path to the existing root directory, in which git repositories will be created
<filter>		       the (find) file pattern for which a git repository must be created

N.B.: the source repository won't be altered in any way

Sample

Imagine you have a single Git repository with several scripts in it, and now you would like a dedicated Git repository for each of your script; then this tool is perfect for you.

./cloneToCleanGitRepositories.sh /path/to/my/catchall/git/repository /tmp/myFirstTest '*.sh'

Contributing

Don't hesitate to contribute or to contact me if you want to improve the project. You can report issues or request features and propose merge requests.

Versioning

The versioning scheme we use is SemVer.

Authors

Bertrand BENOIT

License

This project is under the GPLv3 License - see the LICENSE file for details