diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-10 22:37:47 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-10 22:37:47 +0200 |
commit | 678c6ca2567a16a7f298ea7352a97cc9ef75d4d7 (patch) | |
tree | 20c077090bc3677729be1584579b19bd4652b92d /notes/git_crypt.md | |
parent | chore(hm/conf/task/projects): Update (diff) | |
download | nixos-config-678c6ca2567a16a7f298ea7352a97cc9ef75d4d7.tar.gz nixos-config-678c6ca2567a16a7f298ea7352a97cc9ef75d4d7.zip |
docs(notes/git_crypt): Add information on how to remove `git-crypt`
Diffstat (limited to 'notes/git_crypt.md')
-rw-r--r-- | notes/git_crypt.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/notes/git_crypt.md b/notes/git_crypt.md index 4e192a89..d78e6c46 100644 --- a/notes/git_crypt.md +++ b/notes/git_crypt.md @@ -1,7 +1,20 @@ -# what to do, when nix wants to build the locked repository +# What to do, when nix wants to build the locked repository Simply delete the source path: ``` sudo nix store delete --ignore-liveness <source_path> ``` + +# How to remove git crypt [1]: +To avoid multiple commits and moved around files the following worked for me: +- checkout and unlock repo +- remove `[filter "git-crypt"]` and `[diff "git-crypt"]` sections from `.git/config` +- remove corresponding lines in `.gitattributes` and add changes to the index +- remove symmetric key (if any) `rm .git/git-crypt -r` +- remove (encrypted) path only from the index git rm --cached foobar +- re-add local (unencrypted) path to the index git add foobar +- commit and push the changes + + +[1]: https://github.com/AGWA/git-crypt/issues/170#issuecomment-788820507 |