-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_github.ps1
More file actions
31 lines (24 loc) · 876 Bytes
/
Copy pathupdate_github.ps1
File metadata and controls
31 lines (24 loc) · 876 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
31
# PowerShell script to update the GitHub repository for the frontend
# Navigate to the frontend directory
Set-Location -Path "D:\SHOMBHU\Desktop\incampus\frontend"
# Initialize git if not already initialized
if (-not (Test-Path -Path ".git")) {
Write-Host "Initializing git repository..."
git init
}
# Configure git to use the correct remote
$remoteExists = git remote -v | Select-String -Pattern "origin"
if (-not $remoteExists) {
Write-Host "Adding remote repository..."
git remote add origin https://github.com/SN7k/incampus_frontend.git
}
# Add all files to git
Write-Host "Adding files to git..."
git add .
# Commit changes
Write-Host "Committing changes..."
git commit -m "Update frontend with latest changes"
# Push to GitHub
Write-Host "Pushing to GitHub..."
git push -u origin master
Write-Host "Done! Frontend code has been pushed to GitHub."