Add git-crypt merge driver to support secret files merging. - #107
Add git-crypt merge driver to support secret files merging.#107shlomosh wants to merge 2 commits into
Conversation
…anded by git .gitattribute documentation. Add git-crypt merge driver to support secret files merging.
Any movement on this PR? I just got hit by the unfortunate UX while rebasing/merging. This may fix it right? @shlomosh should this make merge and rebase work like it does with every other file? |
tobiasBora
commented
Jan 27, 2018
I tried this pr, but it did not solve this issue, any idea why? #140 |
Quentin-M
commented
Oct 31, 2018
peay
commented
Jan 24, 2019
@AGWA any chance this would get merged in? |
amoffat
commented
Mar 22, 2019
I love git-crypt, but encrypting config files is a nightmare due to the inability to merge changes. Just vocalizing my support for a feature that fixes that. |
alerque
commented
Mar 23, 2019
I am along time For the new projects I'm looking at keeping significant amounts of content that will be edited in parallel where half of it is copyrighted and half of it will be public. Rather than just making CI builds public I'd like to make the entire repository public and just lock down the files that are for some-eyes-only. If |
alerque
commented
Mar 23, 2019
@amoffat Just a tip: The best architecture I've found for this is to split config files into private and public bits. Most of the time 95% of the content of config files can be unencrypted, usually only a few keys are sensitive (deploy keys, passwords, private URLs, etc.). Often there is a way to import files so that you can put just the one or two sensitive keys in an encrypted file and import it into the unencrypted config. You can often even do this programatically to set different values if the encrypted versions are not available. In the cases where the native config syntax doesn't have a way to handle this it's usually trivial to make merging the sources part of a build or init script. |
krish7919
commented
Mar 24, 2019
You can do something similar with the https://github.com/krish7919/git-crypt-merge-tool (disclaimer, I wrote it). Our use-case is to encrypt a file that is changed on probably every commit we make to the repo, and it works just fine. |
Quentin-M
commented
Mar 24, 2019
via email
The worse for me is that regardless of wether we are modifying encrypted
files or not, merging them or not - we can’t `rebase origin/master` without
committing, locking then unlocking. Huge pain in big repositories. |
AGWA
commented
May 2, 2019
I'm curious why this PR has changed |
As recommended by gitattributes(5):
> For best results, clean should not alter its output further if it is
> run twice ("clean->clean" should be equivalent to "clean"), and
> multiple smudge commands should not alter clean's output
> ("smudge->smudge->clean" should be equivalent to "clean").
I've extracted this change from AGWA#107.
Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>As recommended by gitattributes(5):
> For best results, clean should not alter its output further if it is
> run twice ("clean->clean" should be equivalent to "clean"), and
> multiple smudge commands should not alter clean's output
> ("smudge->smudge->clean" should be equivalent to "clean").
I've extracted this change from AGWA#107.
Co-Authored-By: obiasBora <shlomo.shachar@binatix.com>As recommended by gitattributes(5):
> For best results, clean should not alter its output further if it is
> run twice ("clean->clean" should be equivalent to "clean"), and
> multiple smudge commands should not alter clean's output
> ("smudge->smudge->clean" should be equivalent to "clean").
I've extracted this change from AGWA#107.
Co-Authored-By: shlomosh <shlomo.shachar@binatix.com>As recommended by gitattributes(5):
> For best results, clean should not alter its output further if it is
> run twice ("clean->clean" should be equivalent to "clean"), and
> multiple smudge commands should not alter clean's output
> ("smudge->smudge->clean" should be equivalent to "clean").
I've extracted this change from AGWA#107.
Co-Authored-By: Shlomo Shachar <shlomosh@users.noreply.github.com>As recommended by gitattributes(5):
> For best results, clean should not alter its output further if it is
> run twice ("clean->clean" should be equivalent to "clean"), and
> multiple smudge commands should not alter clean's output
> ("smudge->smudge->clean" should be equivalent to "clean").
I've extracted this change from AGWA#107.
Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>This is a preparation for the merge command. I've extracted this change from AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
This commit is based on AGWA#107. Co-Authored-By: Shlomo Shachar <shlomo.shachar@binatix.com>
AGWA
commented
Jul 28, 2020
Superseded by #180. |
Add git-crypt merge driver to support secret files merging.
Update clean operation to not alter output when it run multiple times, to match recommended behaviour (https://git-scm.com/docs/gitattributes) -