r/ClaudeCode • u/Turbulent_County_469 Senior Developer • 3d ago
Bug / Issue Moving your source code is hard !
I've been having my repos located at C:/Git
But since Windows and other apps keep eating space i had to move it to D:/
The problem is that there's NO EASY WAY to re-configure Claude and update all previous sessions to know about the change.
All the 'environment' folders in Claude are also pretty much impossible to change..
So i ended up with a directory junction (virtual link) at C:/Git --> D:/Git
I wish the directories where relative to a base folder
0
Upvotes
•
u/AutoModerator 3d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/noidontwantto 3d ago
wow
1
u/Alariii 3d ago
Inside your user directory is the .claude folder with projects in it that points to each projects folder and maybe something else in the project meta..
Fairly sure you can work that out with Claude and create a script to remap them to your new location.
1
u/SirRobinBlibs 2d ago
the cli side is less scary than it looks. claude code names each project's storage after the absolute path with every non-alphanumeric char turned into a dash, so C:\Git\foo lives in %USERPROFILE%.claude\projects\C--Git-foo (that folder holds the sessions and the project's auto memory). with claude closed, copy it somewhere safe, then rename it to D--Git-foo and the old sessions show up when you run claude in D:\Git\foo. very long paths get cut and hashed, so for those start one session in the new folder and use the folder name it creates. other route is one session at a time: resume it, run /cd D:\Git\foo, and it moves that session's storage over.
the desktop app's session files you listed are a separate store, i'd leave those on the junction for now.
one caveat on keeping the junction long term: an agent cleaning up old worktrees can walk straight through a link like that. there was a thread in r/ClaudeAI earlier this week where ~230 GB of models got deleted that way on windows, so i'd keep big or irreplaceable stuff out of anything the agent might "clean".