From b64d381d1f2e2d904d566d1e9f81c0f590542053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Fri, 1 Apr 2022 16:58:18 -0400 Subject: [PATCH] Put ahoy deploy steps into block; add notes on git merge/rebase --- index.md | 1 + tools/deploying-drutopia-updates.md | 16 ++++++++++++++++ tools/git-usage.md | 13 ++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/index.md b/index.md index 460affc..9972fec 100644 --- a/index.md +++ b/index.md @@ -45,6 +45,7 @@ maxdepth: 2 --- tools/git-setup +tools/git-usage tools/setting-up-nextcloud tools/setting-up-email tools/creating-new-drutopia-site diff --git a/tools/deploying-drutopia-updates.md b/tools/deploying-drutopia-updates.md index b46bc0a..0f3fccc 100644 --- a/tools/deploying-drutopia-updates.md +++ b/tools/deploying-drutopia-updates.md @@ -55,6 +55,22 @@ ahoy deploy-build next ahoy deploy-site example_test ``` +## Putting it all together + +```bash +cd ~/Projects/drutopia-platform/drutopia_host/hosting_private +ahoy git-pull-all +ahoy deploy-build next +ahoy deploy-site example_live +``` + +## If you need to override site configuration: + +```bash +ahoy deploy-site-force example_test +``` + + ## Bonus: Keep Drutopia builds with similar available modules diff --git a/tools/git-usage.md b/tools/git-usage.md index aee7bba..428dd8e 100644 --- a/tools/git-usage.md +++ b/tools/git-usage.md @@ -2,7 +2,7 @@ ## When NOT to manually resolve merge conflicts -When it's an automatically generated file! +When it is an automatically generated file! For `composer.lock`, for example: @@ -12,3 +12,14 @@ ddev composer update git add composer.lock git commit ``` + +## Bringing feature branches into main + + + +It is OK to do git merges rather than rebase on top of the main branch, especially when in the GitLab UI where merge is the only option— but be absolutely certain "Squash commits" is **not** checked. + + +### Discussion + +Hmm git GUIs would show all the commits in the branch they were worked on when there are merge requests, right? (if not squashed?) Maybe better to prefer merges than rebases for feature branches, for preserving the history of where the work was done. My problem with git merge commits is they can rewrite history inside them, like have changes not shown in any other commit, and they make it hard to see what happened— does not show up in git log -p for instance. (You can see the history but if the stack overflow explanation does not fit on one page i don't want it as part of my daily workflow. https://stackoverflow.com/a/40986893/1028376 )