Git-Wizzy or Wizzy for friends is a simple utility that can restores files from an internal cache.
Imagine you are working in a team on a project and you are using git.
You have a bunch of configuration files you have to commit but in a fake state.
See this example related to ruby on rails :
my_important_project: &my_important_project
adapter: mysql2
encoding: utf8
reconnect: false
pool: 5
username: i_dont_want_to_tell_you_my_username
password: and_neither_my_password
socket: /var/run/mysqld/mysqld.sock.. and then you have your local copy with 'real' values. Each time you commit/pull to this repo you have to stash or checkout your real files and merging is painful!
wizzy fixYep. It's simple
- Install pyyaml
pip install pyyaml- Install clint
pip install clint-
Clone the repository
-
Run this command. This will run wizzy executable and also add the alias to your .bashrc
chmod +x wizzy ; echo 'alias wizzy="./wizzy "' >> ~/.bashrc && . ~/.bashrc-
Copy
wizzyandwizzy_config.ymlin your project folder -
Open your
wizzy_config.ymlfile and tell him what are the files you want to be magic. Check out this example
...
files: [config/*.yml, config/initializers/secret_token.rb]
wizzy_cache_directory: .wizzy
wizzy_directory: .
wizzy_remote: false- You should add all the wizzy files to the .gitignore . Just run this command
echo -e 'wizzy \nwizzy_config.yml' >> .gitignore- Install wizzy
wizzy install
-
Each time you need to restore files just type
wizzy fix -
If you want to create the cache just type
wizzy install -
Do you want to track/untrack your restored files ?
wizzy trackorwizzy untrack -
Do you want to track a new file ? You could modify the wizzy_config.yml .. or just type
wizzy add <file> -
Do you want to untrack a old file ? You could modify the wizzy_config.yml .. or just type
wizzy remove <file> -
Do you want to check if you screwed the configuration of wizzy? of if you added an phantom file?
wizzy check -
Of course what is better than a doctor when wizzy is sick?
wizzy doctor -
Do you want the list of all files wizzy tracks ?
wizzy list -
Don't remember a spell?
wizzy help
- Bugs? Issues? use the system tracker
- Suggestions? email me
- Fork it, make it better and send me a pull request!
This product was developed by Damiano Braga.