summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUser Mms <mms@voyager.local>2024-10-29 22:53:43 +0100
committerUser Mms <mms@voyager.local>2024-10-29 22:53:43 +0100
commit6d2d50f49adaeee41e91a4de45c127035352dbe4 (patch)
treeaaa101175b7a903f6efba998012073458b1c6650
parent7a78a9ddadc0317b10859feeaf800cc9632997da (diff)
feat: multi-git
-rw-r--r--content-org/blog.org47
-rw-r--r--content/blog/2024/multiple-git-repos-single-dir.md50
-rw-r--r--themes/24-unification/layouts/_default/baseof.html5
3 files changed, 99 insertions, 3 deletions
diff --git a/content-org/blog.org b/content-org/blog.org
index 8596c37..fbf739c 100644
--- a/content-org/blog.org
+++ b/content-org/blog.org
@@ -8,7 +8,7 @@
#+HUGO_SECTION: blog
-* 2024 [88/90] :@blog:
+* 2024 [89/91] :@blog:
:PROPERTIES:
:EXPORT_HUGO_SECTION: blog/2024
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :image_dir "blog/images" :image_max_width 600
@@ -122,6 +122,51 @@ It's small annoyance, but it shows the general direction.
Microsoft GitHub is still not near the biggest sin an Open Source can commit when it comes to cooperation (that crown still goes to using Discord), but it's far from being "Open".
+** DONE Cool things I didn't knew: multiple Git repositories in a single directory
+CLOSED: [2024-10-29 Tue 22:51]
+:PROPERTIES:
+:EXPORT_FILE_NAME: multiple-git-repos-single-dir
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :Abstract How to combine files from multiple repositories in one directory?
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :Listening John Coltrane - A Love Supreme
+:END:
+
+I am trying to find a nice way to add sync to my org.
+I can't use any syncthing nor dropbox on my work computer, but I won't ever put google drive on my personal one.
+When asked on Mastodon, people proposed me to use git.
+
+I'm sure you know that =git worktree= allows you to have multiple branches available at the same time.
+But, did you knew that the =.git= folder, although standard, is not mandated?
+In fact, all your git data can live anywhere.
+
+First, you need a standard =.git= folder, so let's
+
+#+begin_src shell
+git init
+mv .git .git-one
+#+end_src
+
+Now, if you =git status=, there won't be no git repository found.
+But we can force git to use our new dir
+
+#+begin_src shell
+git --git-dir=.git-one status
+#+end_src
+
+This tricks allows us to have any number of git repositories co-exist in the same directory.
+Those can share files (just =git add= them), or be completely different.
+
+So, want to have a =work_org= and =private_org= side by side?
+No problem!
+
+Each repository has it own:
+- origin
+- staging area
+- history
+
+and so on.
+
+Pretty cool, I might add.
+
** DONE RE: Michał Sapka’s new home
CLOSED: [2024-10-29 Tue 21:13]
:PROPERTIES:
diff --git a/content/blog/2024/multiple-git-repos-single-dir.md b/content/blog/2024/multiple-git-repos-single-dir.md
new file mode 100644
index 0000000..8a2f612
--- /dev/null
+++ b/content/blog/2024/multiple-git-repos-single-dir.md
@@ -0,0 +1,50 @@
++++
+title = "Cool things I didn't knew: multiple Git repositories in a single directory"
+author = ["Michał Sapka"]
+date = 2024-10-29T22:51:00+01:00
+categories = ["blog"]
+draft = false
+weight = 2001
+image_dir = "blog/images"
+image_max_width = 600
+Abstract = "How to combine files from multiple repositories in one directory?"
+Listening = "John Coltrane - A Love Supreme"
++++
+
+I am trying to find a nice way to add sync to my org.
+I can't use any syncthing nor dropbox on my work computer, but I won't ever put google drive on my personal one.
+When asked on Mastodon, people proposed me to use git.
+
+I'm sure you know that `git worktree` allows you to have multiple branches available at the same time.
+But, did you knew that the `.git` folder, although standard, is not mandated?
+In fact, all your git data can live anywhere.
+
+First, you need a standard `.git` folder, so let's
+
+```shell
+git init
+mv .git .git-one
+```
+
+Now, if you `git status`, there won't be no git repository found.
+But we can force git to use our new dir
+
+```shell
+git --git-dir=.git-one status
+```
+
+This tricks allows us to have any number of git repositories co-exist in the same directory.
+Those can share files (just `git add` them), or be completely different.
+
+So, want to have a `work_org` and `private_org` side by side?
+No problem!
+
+Each repository has it own:
+
+- origin
+- staging area
+- history
+
+and so on.
+
+Pretty cool, I might add.
diff --git a/themes/24-unification/layouts/_default/baseof.html b/themes/24-unification/layouts/_default/baseof.html
index 602a902..f83bc80 100644
--- a/themes/24-unification/layouts/_default/baseof.html
+++ b/themes/24-unification/layouts/_default/baseof.html
@@ -89,7 +89,7 @@
background-color: var(--bg-color);
color: var(--text-color);
background-attachment: fixed;
- max-width: 98%;
+ max-width: 100%;
font-family: "bryle";
font-size: 1.0em;
display: flex;
@@ -218,7 +218,8 @@
margin-bottom: 20px;
border-bottom: var(--cool-border);
border-right: none;
-
+ box-sizing: border-box;
+
.nav-box {
width: 100%;
border: 0;