gitnpmgit-crypt

git-crypt update file thats been encrypted


Ive a .env file, and a number of others encrypted with git-crypt.

git-crypt lock asks to clean working directory. Appending --force removes all changes to .env and just gives me the original file

I'm adding new values into the .env file and want to re-encrypt the file anew, then check it in to git.


Solution

  • Best answer I found was running git-crypt lock --force; git-crypt unlock;, pasting in the .env changes, then in the git cli running a commit. It converts to binary in a webhook that looked to not work correctly when interfacing with a git ui like gitkraken