Weeknotes 8
22nd August, 2021
“Fire in the Valley and git subtree”
-
After a reading hiatus that has lasted way too long I finished Fire in the Valley: The Making of the Personal Computer last week (but I forgot to mention it then). I had next to no knowledge of how the Personal Computer was created despite owing my career to it. The only complaint I have is that it doesn’t cover much of what was happening in Europe over the same time period (I wonder if it exists?) but it is entitled “Fire in the Valley” so it’s understandable.
-
We decided to move some services alongside each other in a single monorepo. The source repo needed to live in a sub-directory of an existing repo, and ideally I wanted to bring the commit history from the source repo along with the code - it’s a shame to waste a well written commit history.
Googling resulted in many methods, old and new, but in the end I setted on using
git subtree
. It seemed to be the most straightforward way to move a repo into another.I pulled the external repo into a sub directory using:
git subtree add --prefix sub-directory/ path/to/source-repo/ master
This resulted in a single commit and also brings along history.
Straying from normal day-to-day Git usage can be scary. There are many ways to achieve a goal and trying to find the proper way to do it can be difficult, so hopefully this works out ok.
-
The Google Cloud Console continues to tell me lies about the state of running services. They could do with dragging their slider to the right too - so slow.