Skip to content

Instantly share code, notes, and snippets.

@redshiftzero
Created January 17, 2019 18:47
Show Gist options
  • Save redshiftzero/c5d2bb4f1802a9f8bbc93ffc04f79106 to your computer and use it in GitHub Desktop.
Save redshiftzero/c5d2bb4f1802a9f8bbc93ffc04f79106 to your computer and use it in GitHub Desktop.
prod-specific.yml test
redshiftzero nimloth ../securedrop-prod-specific-test $ git init
Initialized empty Git repository in /Users/redshiftzero/Documents/Github/securedrop-prod-specific-test/.git/
redshiftzero nimloth ../securedrop-prod-specific-test $ ls
redshiftzero nimloth ../securedrop-prod-specific-test $ vi prod-specific.yml # Add prod-specific.yml from 0.3.12
redshiftzero nimloth ../securedrop-prod-specific-test $ git add prod-specific.yml
redshiftzero nimloth ../securedrop-prod-specific-test $ git commit
[master (root-commit) ee55b8f] My prod-specific file from 0.3.12
1 file changed, 52 insertions(+)
create mode 100644 prod-specific.yml
redshiftzero nimloth ../securedrop-prod-specific-test $ git tag 0.3.12
My prod-specific.yml from 0.4
redshiftzero nimloth ../securedrop-prod-specific-test $ vi prod-specific.yml # Modify prod-specific.yml to what it was at 0.4
redshiftzero nimloth ../securedrop-prod-specific-test $ git diff
diff --git a/prod-specific.yml b/prod-specific.yml
index 5b0bebe..0e58dd0 100644
--- a/prod-specific.yml
+++ b/prod-specific.yml
@@ -2,6 +2,7 @@
### Used by the common role ###
ssh_users: ""
dns_server: "8.8.8.8"
+daily_reboot_time: 4 # An integer between 0 and 23
# TODO Should use ansible to gather this info
monitor_ip: ""
redshiftzero nimloth ../securedrop-prod-specific-test $ git add prod-specific.yml
redshiftzero nimloth ../securedrop-prod-specific-test $ git commit
# The OSSEC alert GPG public key has to be in the install_files/ansible-base/ or
[master 5f0743b] My prod-specific.yml from 0.4
1 file changed, 1 insertion(+)
redshiftzero nimloth ../securedrop-prod-specific-test $ git tag 0.4
redshiftzero nimloth ../securedrop-prod-specific-test $ git status
On branch master
nothing to commit, working tree clean
redshiftzero nimloth ../securedrop-prod-specific-test $ git checkout 0.3.12
Note: checking out '0.3.12'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at ee55b8f... My prod-specific file from 0.3.12
redshiftzero nimloth ../securedrop-prod-specific-test $ vi prod-specific.yml # Now fill in every variable that was present during 0.3.12
redshiftzero nimloth ../securedrop-prod-specific-test $ git stash save "site specific configs"
Saved working directory and index state On (no branch): site specific configs
redshiftzero nimloth ../securedrop-prod-specific-test $ git checkout 0.4
Previous HEAD position was ee55b8f... My prod-specific file from 0.3.12
HEAD is now at 5f0743b... My prod-specific.yml from 0.4
redshiftzero nimloth ../securedrop-prod-specific-test $ git stash pop
Auto-merging prod-specific.yml
HEAD detached at 0.4
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: prod-specific.yml
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (eeb015f6939d9662512b0fa3213f8b3c2619903f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment