aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/credentials/USAGE
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands/credentials/USAGE')
-rw-r--r--railties/lib/rails/commands/credentials/USAGE15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/credentials/USAGE b/railties/lib/rails/commands/credentials/USAGE
index c8d3fb9eda..6b896ab02a 100644
--- a/railties/lib/rails/commands/credentials/USAGE
+++ b/railties/lib/rails/commands/credentials/USAGE
@@ -30,6 +30,21 @@ You could prepend that to your server's start command like this:
RAILS_MASTER_KEY="very-secret-and-secure" server.start
+=== Set up Git to Diff Credentials
+
+Rails provides `rails credentials:diff --enable` to instruct Git to call `rails credentials:diff`
+when `git diff` is run on a credentials file.
+
+Running the command enrolls the project such that all credentials files use the
+"rails_credentials" diff driver in .gitattributes.
+
+Additionally since Git requires the driver itself to be set up in a config file
+that isn't tracked Rails automatically ensures it's configured when running
+`credentials:edit`.
+
+Otherwise each co-worker would have to run enable manually, including on each new
+repo clone.
+
=== Editing Credentials
This will open a temporary file in `$EDITOR` with the decrypted contents to edit