how to cherry-pick commit containing encrypted file?

72 Views Asked by At

I have one repo with encrypted files. I want to move all of them, including commit history into another repo. I c̶a̶n̶n̶o̶t̶ couldn't figure out very long time a way how to do that.

What eventually worked for me is this:

  1. git init
  2. in old repo git-crypt export-key ~/kf
  3. do NOT unlock repo
  4. setup encrypted diretories just as in old project, commit .gitattributes files.
  5. still do NOT unlock repo
  6. setup remote repo in .git/cofig, cherry-picking.
  7. now unlock the repo git-crypt unlock ~/kf, add collaborators.

this worked for me, if there is better way how to do that, please tell me.

0

There are 0 best solutions below