git-mix
git-mix is inspired by git-crypt but implemented by rust.
How it works
Based on Git Attributes. Using the “clean” and “smudge” filters , we can can set a filter for particular paths before they’re checked out and staged as the following:
How to install
Thanks to cargo :)
Use
initialization
- edit the .gitattributes to set the path you want to mix as the following:
.gitattributes !filter
private/* filter=git-mix
- run
git-mix gen
to generate the config for defining the filtergit-mix
-
append template to .git/config
-
remember the key, or you can reset the key which is required 32 bytes by
git-mix genkey
or yourself -
commit the private data and push remote to checkout the mixed data:)
clone
- git clone -n giturl
- run
git-mix gen --key <key>
to generate the filter template
- append the template to .git/config
- git reset --hard HEAD
- check the private data :)
Contributing
To contribute to git-mix, clone this repo locally and commit your code on a separate branch.
PS: PR Welcome :rocket: :rocket: :rocket: :rocket:
Author
GitHub @detailyang
License
git-mix is licensed under the MIT license.