Futures
Access hundreds of perpetual contracts
TradFi
Gold
One platform for global traditional assets
Options
Hot
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Introduction to Futures Trading
Learn the basics of futures trading
Futures Events
Join events to earn rewards
Demo Trading
Use virtual funds to practice risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Launchpad
Be early to the next big token project
Alpha Points
Trade on-chain assets and earn airdrops
Futures Points
Earn futures points and claim airdrop rewards
Worktree is better suited as a one-time execution directory.
A common practice recently has been to prepare a worktree first, then open Codex / Claude Code within that directory. Because early models had limited context and memory, if you let it create a worktree directly in the main workspace, it’s easy for the current directory and the created worktree directory to get mixed up after context compression, leading to confusion.
However, this approach also has a side effect: it gradually turns the worktree into a long-term workspace. The problem is, worktrees are inherently tied to branches, and over time, you'll encounter additional hassles like branch switching, synchronization, and cleanup.
Many people also don’t clearly distinguish between worktrees and independent clones. The benefit isn’t just “an extra directory,” but that fundamentally, they are the same repository sharing the git object database, with low copying costs and no need to re-clone over the network. This is especially convenient for large repositories. So if you just want a temporary parallel execution directory, worktree is very suitable. Only when you explicitly need a completely independent object database—for example, mapping to Docker or a virtual machine sandbox—would a local clone be more appropriate.
At least for now with Codex / Claude Code, this issue isn’t as serious anymore. I now prefer to work directly in the main directory, letting it create worktrees as needed, then merge back after changes, and delete the worktree. This aligns better with the original purpose of worktrees: low-cost temporary execution directories, not long-term secondary workspaces.
One step further, I am currently experimenting with maintaining a global workspace where all project Codex instances are opened in this directory, and it manages clones and worktrees according to rules. This makes global memory more continuous, and if a task requires editing multiple projects simultaneously, it knows how to handle each one sequentially and then perform joint testing.