Open dazza-codes opened 5 years ago
git-add
the unlocked state of the files that were previously encrypted from your working directory and commit them.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.
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)
Had same issue. Only next tricky works for me (problem file is a foo.py in this example):
cat foo.py > spam.py
git add spam.py; git commit -m "added version without enc"; git push
git rm foo.py
git add .gitattributes.py; git commit -m "delete encrypted version"; git push
git mv spam.py foo.py; git commit -m "rename version without encyption"; git push
To avoid multiple commits and moved around files the following worked for me:
[filter "git-crypt"]
and [diff "git-crypt"]
sections from .git/config
.gitattributes
and add changes to the indexrm .git/git-crypt -r
git rm --cached foobar
git add foobar
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.
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?