AI Library
The Double Structure of Digital Sovereignty
Europe’s Departure from Palantir and the Chains of American Big Tech
Kim Kyung-jin, Attorney at Law
This is a record of 2026, when European intelligence agencies and defense ministries began removing analytics tools from America’s Palantir. It covers the replacement decisions made by France’s General Directorate for Internal Security (DGSI), Germany’s Federal Office for the Protection of the Constitution (BfV), and the Netherlands Ministry of Defense; the incident in which US export controls severed an ally’s ac…
New English Edition
Artificial Intelligence in Horticulture
Kim Kyung-jin, Attorney at Law
Across five chapters and ten sections, this book examines computer vision for crop diagnosis, harvesting robots and autonomous field systems, smart greenhouses and digital twins, precision irrigation and supply-chain quality control, high-throughput phenotyping, and predictive breeding.
New English Edition
Artificial Intelligence in Food Crop Agriculture
Kim Kyung-jin, Attorney at Law
Across six chapters and eighteen sections, the book examines digital agricultural infrastructure, remote sensing, crop diagnosis, yield forecasting, precision irrigation, genomics, molecular breeding, agricultural robotics, climate-smart agriculture, and global food security.
New English Edition
The Future of Forestry and Agroforestry
Kim Kyung-jin, Attorney at Law
Driven by Artificial Intelligence and Digital Innovation
Across five chapters and fifteen sections, the book follows satellites, drones, LiDAR, digital twins, forest-specific language models, wildfire and pest forecasting, forestry robotics, agroforestry, timber traceability, and forest carbon markets.
New English Edition
Smart Livestock Farming: AI Enters the Barn
Kim Kyung-jin, Attorney at Law
Sensors listen, cameras watch, and artificial intelligence helps farmers decide.
Across five chapters and fifteen sections, the book follows precision livestock farming from animal health and reproduction to robotic milking, virtual fencing, digital twins, methane reduction, welfare, and data ownership.
Table of Contents
Han Dong-hoon, Busan Buk-gu Gap: A Record of the 100 Days Before and After the Election (Mar. 26-Jul. 3, 2026)
Kim Kyung-jin
Table of Contents and 13 sections
From March 26 to July 3, 2026, this record follows the spring after expulsion, the Busan Buk-gu Gap by-election, victory as an independent, and the first bill submitted in the National Assembly.

Table of Contents
Artificial Intelligence and Medicine
Kim Kyung-jin, Attorney at Law
AI in clinical care, hospitals, education, and research
AI in medical imaging, risk prediction, treatment planning, hospital operations, education, and research, with patient safety, privacy, and accountability.
[AI Library] Chapter 30: Git Worktrees: The Secret to Safe Parallel Development
Mastering Claude Code
Chapter 30: Git Worktrees: The Secret to Safe Parallel Development
Kim Kyung-jin
Mastering Claude Code
The Emergency Call
You are building a new payment feature. You have written about half the code when a Slack notification arrives. There is an urgent report of a login bug on the production server. You must fix it right now.
The problem is that the code you are working on now is still incomplete. It is not ready to commit, yet you cannot discard the changes. To switch branches for the urgent fix, you must save your current work somewhere temporarily. Stash it with git stash, change branches, fix the issue, return to the original branch, and then restore the stash. It is complicated. There are many places where mistakes can slip in.
Git Worktree solves this situation fundamentally.
What Is a Worktree?
In Git's basic structure, one repository is connected to one working directory. Within that directory, you can check out only one branch at a time. To work on a different branch, you must first clean up the changes in your current branch and then switch branches.
A worktree breaks this constraint. You can check out multiple branches simultaneously from one repository. Each branch exists in a separate folder.
Here is an analogy. The traditional way is an office with only one desk. If you are working on project A with documents spread out and need to switch to project B, you must clear away all of A's documents and pull out B's. A worktree is like putting down multiple desks. You leave A's documents spread out on the first desk and do B's work at the second desk. Each desk is independent, but they are in the same office (repository).
Basic Worktree Usage
The Git command to create a worktree is straightforward.
This command creates a new working directory at the path ../hotfix-login, checking out the branch named hotfix/login-bug from the current repository. The existing working directory remains untouched.
Now you have two folders. The original folder still contains the payment feature code you were developing, and the new folder has the emergency fix branch cleanly checked out. You can work in both folders without affecting each other's files.
To view a list of worktrees:
To remove a completed worktree:
Since you are not actually copying entire folders, disk usage is efficient. Git's internal data (the .git directory) is shared, and each worktree checks out only the files for its respective branch.
Claude Code's Native Worktree Support
Claude Code supports Git worktrees natively. You do not need to type Git commands directly.
This one line causes Claude Code to automatically create a worktree, make a new branch, and start a Claude Code session in that worktree. You can enjoy the benefits of worktrees without knowing Git's complex command structure.
Of course, if you need fine-grained control, you can use Git commands directly. Claude Code's native support is for convenience, not to limit Git's capabilities. You can mix both approaches as the situation requires.
Running Multiple Sessions: A Real-World Scenario
The true power of worktrees becomes clear when combined with Claude Code. Each worktree can run an independent Claude Code session.
Let me paint a concrete scenario.
Situation: You are developing an e-commerce platform. Three tasks are needed simultaneously.
Execution:
In terminal A:
"Implement a wishlist feature. Users should be able to add and remove items, and share the list."
In terminal B:
"Redesign the checkout page UI with mobile first in mind. Refer to the current design screenshot."
In terminal C:
"Fix the bug where the total does not update when changing quantities in the shopping cart."
All three sessions run simultaneously. Each session modifies files only within its own worktree, so no conflicts occur. When the urgent fix finishes first, you merge that branch into main and continue developing the remaining features.
Handling Feature Development and Emergency Fixes in Parallel
The key in the scenario above is that the emergency fix does not disrupt existing development work.
What would happen without worktrees? You would stop work halfway through the wishlist feature, stash your changes or make an incomplete commit, switch branches, fix the bug, return to the original branch, and restore the stash. In this process, stash conflicts can occur, and incomplete commits can clutter the history.
With worktrees, this hassle disappears. The wishlist work stays right where it is. You open a new terminal and fix the bug in a new worktree. When done, you remove the worktree. When you return to the wishlist work, there is nothing to restore or switch. You simply continue in your original terminal.
This safety becomes even more important when running multiple Claude Code sessions. When humans write code directly, they immediately recognize mistakes. But when an AI agent writes code, sessions can silently overwrite each other's work. Worktrees make this accident structurally impossible.
Practical Advice for Managing Worktrees
As you create more worktrees, management becomes necessary. Here are a few practical tips.
Establish a naming convention. Using prefixes like feature-, hotfix-, or refactor- consistently makes it easy to see at a glance what each worktree is for.
Remove completed worktrees immediately. Neglecting them causes confusion about which worktrees are active. After merging a branch into main, clean up with git worktree remove.
Keep worktree directories in consistent locations. Establish a rule, such as placing them in a parent directory at the same level as your project folder or designating a specific folder within the project. This prevents wasting time searching for worktrees.
The Safety Net of Parallel Development
Worktrees are not flashy technology. They are merely an extension of Git's basic features. Yet the difference this extension creates is substantial.
When the constraint of working on only one task per branch disappears, your workflow changes fundamentally. You no longer have to pause feature development for urgent fixes. Multiple agents can work on the same project at the same time without interfering with each other. You can freely experiment with exploratory approaches in a separate worktree.
To run multiple sessions with such freedom, you must also decide how much authority to grant each session. Should agents modify files freely, or must they request approval each time? Now we examine how to balance autonomy with control.
Kim Kyung-jin, AI Policy Expert and Attorney
Specialist in AI policy · Former member of the National Assembly · Author of numerous works
If this book has stayed with you even briefly, please support the next story so it can reach the world.
(Voluntary support account: Nonghyup 302-1096-0948-81 Account holder: Kim Kyung-jin)
Kim Kyung-jin
Attorney · Former Member of the National Assembly · AI Policy Researcher
© 2026 Kim Kyung-jin. All rights reserved.








