AGWA / git-crypt

Transparent file encryption in git
https://www.agwa.name/projects/git-crypt/
GNU General Public License v3.0
8.18k stars 475 forks source link

Document how to undo git-crypt, e.g. remove item from .gitattributes #170

Open dazza-codes opened 5 years ago

dazza-codes commented 5 years ago

There is documentation about how to apply git-crypt, but nothing to un-apply it. What happens when a file that is encrypted, with an entry in the .gitattributes file to use the git-crypt filters, and a new commit removes the .gitattributes entry? How is a file intentionally released from git-crypt filters?

alerque commented 5 years ago
  1. Checkout and unlock a copy of the repository.
  2. Remove the relevant attribute filter lines.
  3. git-add the unlocked state of the files that were previously encrypted from your working directory and commit them.
redthor commented 4 years ago

FWIW, I found that my PR on GitHub to unencrypt a file showed the .gitattributes changes but the file still looked encrypted. You are able to view the file however and it is unencrypted.

yangzii0920 commented 4 years ago
1. Checkout and unlock a copy of the repository.

2. Remove the relevant attribute filter lines.

3. `git-add` the unlocked state of the files that were previously encrypted from your working directory and commit them.

Doesn't work. first off git-add is not found... then did git add after unlock, update .gitattribute. File pushed still encrypted on github. (locally it's not encrypted, but if I clone again it would be)

ilia-tsyplenkov commented 3 years ago

Had same issue. Only next tricky works for me (problem file is a foo.py in this example):

hvhaugwitz commented 3 years ago

To avoid multiple commits and moved around files the following worked for me:

Tointoin commented 2 years ago

I tried @ilia-tsyplenkov and @hvhaugwitz workarounds but my file is style encrypted and considered as binary on Github entreprise.

My problem with their solutions is that .gitattributes has already been modified before.