-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_remote.ps1
More file actions
30 lines (23 loc) · 887 Bytes
/
setup_remote.ps1
File metadata and controls
30 lines (23 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Script para configurar el remote de GitHub
# Ejecuta este script después de crear el repositorio en GitHub
param(
[Parameter(Mandatory=$true)]
[string]$RepoUrl
)
Write-Host "Configurando remote para: $RepoUrl" -ForegroundColor Green
# Cambiar al directorio del proyecto
Set-Location "c:\Users\ZeroM\instinct"
# Verificar si ya existe un remote
$existingRemote = git remote get-url origin 2>$null
if ($existingRemote) {
Write-Host "Eliminando remote existente: $existingRemote" -ForegroundColor Yellow
git remote remove origin
}
# Agregar el nuevo remote
Write-Host "Agregando remote: $RepoUrl" -ForegroundColor Green
git remote add origin $RepoUrl
# Verificar
Write-Host "`nRemote configurado:" -ForegroundColor Green
git remote -v
Write-Host "`nAhora puedes hacer push con:" -ForegroundColor Cyan
Write-Host " git push -u origin main" -ForegroundColor Yellow