# restructure-repo.ps1 # Moves the git repo root from VizionAI-Trading\ into VizionAI-Trading-Repo\VizionAI-EA\ # so each repo in VizionAI-Trading-Repo\ is its own independent git repo. $vizion = "C:\Users\sahrk\AppData\Roaming\MetaQuotes\Terminal\FB9A56D617EDDDFE29EE54EBEFFE96C1\MQL5\Shared Projects\VizionAI-Trading" $eaRepo = "$vizion\VizionAI-Trading-Repo\VizionAI-EA" $remote = "https://forge.mql5.io/Vizion-Trading/Vizion-Trading-EA.git" # Step 1: Remove the stray .git from VizionAI-Trading\ root Write-Host "Removing stray .git from VizionAI-Trading root..." -ForegroundColor Yellow Remove-Item "$vizion\.git" -Recurse -Force Write-Host "Done." -ForegroundColor Green # Step 2: Init fresh git repo inside VizionAI-EA\ Write-Host "" Write-Host "Initialising git repo in VizionAI-EA\..." -ForegroundColor Yellow git -C $eaRepo init -b main git -C $eaRepo config user.name "SahrJohn" git -C $eaRepo config user.email "SahrJohn@users.noreply.forge.mql5.io" git -C $eaRepo remote add origin $remote Write-Host "Remote set to: $remote" -ForegroundColor Green # Step 3: Stage all EA source files (source only — .ex5/.log excluded by .gitignore) Write-Host "" Write-Host "Staging EA files..." -ForegroundColor Yellow git -C $eaRepo add . git -C $eaRepo status --short # Step 4: Commit Write-Host "" Write-Host "Committing..." -ForegroundColor Yellow git -C $eaRepo commit -m "$( 'refactor: restructure repo root to VizionAI-EA (flat layout) Files are now tracked at repo root, not nested under VizionAI-Trading-Repo/VizionAI-EA/. Removes the stray parent-level .git that was wrapping everything. Co-Authored-By: Claude Sonnet 4.6 ' )" # Step 5: Force push (new clean history replaces nested structure on remote) Write-Host "" Write-Host "Force pushing to origin/main..." -ForegroundColor Yellow git -C $eaRepo push origin main --force Write-Host "" Write-Host "=== Done! ===" -ForegroundColor Green Write-Host "Repo is now at: $eaRepo" git -C $eaRepo log --oneline -3