logo
search
OneDrive File Issues

How to Move VS Code and GitHub Desktop Projects Out of OneDrive

Khadija KhanKhadija Khan Oct 7, 2026 868 views

Question details

The user needs to move VS Code and GitHub Desktop project folders from a OneDrive-synced directory to a local-only location on their PC without risking data loss via cloud synchronization.

How to Move VS Code and GitHub Desktop Projects Out of OneDrive
Product
OneDrive, Visual Studio Code, GitHub Desktop
Device & OS
not provided
Scenario
Migrating development projects from a cloud-synced folder to a local storage location to prevent unwanted synchronization and potential file conflicts.
Observed behavior
Because the project files are currently in a OneDrive directory, deleting or moving them directly triggers synchronization that may delete both local and cloud copies across all devices.
Before you start

Ensure all pending changes in GitHub Desktop are committed or stashed, and verify that Visual Studio Code is completely closed before initiating any file transfers.

Solution 1Recommended

Safely Copy Projects and Re-link Applications

This method ensures your project files are safely copied to a local directory before removing them from OneDrive, preventing accidental cloud deletion.

Moving files directly out of a OneDrive folder is often treated as a deletion by the synchronization engine. To safely transition your work to a local-only setup, you must first create a copy of the files, link your development applications to the new location, and only then remove the original synchronized folder.

1
Create a New Local Folder

Open File Explorer and navigate to a location under 'This PC' that is outside of the OneDrive directory (for example, C:\Projects or your local Documents folder).

2
Copy the Project Files

Select your VS Code project folders and GitHub Desktop repository folders inside the OneDrive directory. Press Ctrl+C to copy them, navigate to your newly created local folder, and press Ctrl+V to paste them.

3
Update GitHub Desktop Repository Paths

Open GitHub Desktop. For each repository, go to File > Add Local Repository and browse to the new folder location outside of OneDrive to reconnect it.

4
Update VS Code Settings

Open Visual Studio Code. Go to File > Preferences > Settings, and change your default workspace, save locations, or integrated terminal paths to point to the new local folder under This PC. Restart VS Code.

5
Delete the Original OneDrive Folder

Once you have verified that your projects open correctly in both applications from the new local path, you can safely right-click and delete the original folder inside the OneDrive directory.

Safely Copy Projects and Re-link Applications
Verification is Crucial: Do not delete the synchronized folder until the local copy has been thoroughly verified. Deletions in the OneDrive folder will immediately sync to the cloud and remove the files from your other devices.
Free Microsoft Office alternative

Manage Your Project Documentation Efficiently with WPS Office

While you organize your development repositories locally to avoid OneDrive sync issues, you can rely on WPS Office for all your project documentation. It is a lightweight, high-performance suite that works seamlessly with Microsoft Office formats without forcing unwanted cloud syncing.

  1. 1. Download the Installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install WPS Office: Run the downloaded executable file and follow the straightforward on-screen instructions to install the suite.
  3. 3. Start Creating Documentation: Launch WPS Writer, Spreadsheet, or Presentation to easily manage your software project documentation locally.
Free and lightweight office suite for developers and professionalsFully compatible with Microsoft Word, Excel, and PowerPoint formatsLocal-first file management without forced cloud synchronizationFamiliar user interface allowing for seamless migration
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I just drag and drop the project folder out of OneDrive?

Dragging and dropping a folder out of the OneDrive directory is often interpreted by OneDrive as a file deletion. This deletion action will synchronize to the cloud, potentially causing you to lose access to the files on your other connected devices.

What happens if GitHub Desktop can't find my repository after moving it?

If GitHub Desktop loses track of a repository because it was moved, it will display a 'Can't find folder' error. You can fix this by clicking the 'Locate' button in the application interface and browsing to the new folder location outside of OneDrive.

Does updating VS Code settings automatically move my files?

No, updating paths in Visual Studio Code settings only tells the application where to look for or save files by default. You still need to manually copy or move your project files using File Explorer before updating the settings.