git-mix

Crates.iogit-mix
lib.rsgit-mix
version0.1.5
sourcesrc
created_at2017-07-31 15:13:16.903335
updated_at2017-08-01 15:43:04.563079
descriptionMix the git data with AES-256-ECB mode
homepage
repositoryhttps://github.com/detailyang/git-mix
max_upload_size
id25819
size49,301
detailyang (detailyang)

documentation

https://github.com/detailyang/git-mix

README

git-mix

Build Status Release

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:

clean smudge

How to install

Thanks to cargo :)

cargo install git-mix

Use

initialization

  1. edit the .gitattributes to set the path you want to mix as the following:
private/* filter=git-mix
.gitattributes !filter
  1. run git-mix gen to generate the config for defining the filter git-mix
[filter "git-mix"]
    clean = git-mix encrypt --key BiqdSyKwmnIFDKg1LzXIg5eEM3RWbdUb
    smudge = git-mix decrypt --key BiqdSyKwmnIFDKg1LzXIg5eEM3RWbdUb
  1. append template to .git/config

  2. remember the key, or you can reset the key which is required 32 bytes by git-mix genkey or yourself

  3. commit the private data and push remote to checkout the mixed data:)

clone

  1. git clone -n giturl
  2. run git-mix gen --key <key> to generate the filter template
❯ git-mix gen --key BiqdSyKwmnIFDKg1LzXIg5eEM3RWbdUb                       127ms
[filter "git-mix"]
    clean = git-mix encrypt --key BiqdSyKwmnIFDKg1LzXIg5eEM3RWbdUb
    smudge = git-mix decrypt --key BiqdSyKwmnIFDKg1LzXIg5eEM3RWbdUb
  1. append the template to .git/config
  2. git reset --hard HEAD
  3. 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.

Commit count: 23

cargo fmt