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:
git init
- in old repo
git-crypt export-key ~/kf
- do NOT unlock repo
- setup encrypted diretories just as in old project, commit .gitattributes files.
- still do NOT unlock repo
- setup remote repo in .git/cofig, cherry-picking.
- 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.