Skip to content

Instantly share code, notes, and snippets.

View pvroegh's full-sized avatar

Patrick Vroegh pvroegh

View GitHub Profile
@pvroegh
pvroegh / SyncGitRepo
Last active October 19, 2022 07:38
This script will sync a specified Git repository.
# This script will sync the specified Git repository.
# Schedule this script with the scheduler of your choosing to automate it.
$RepoPath = "C:\Repositories\brain2.0\"
cd $RepoPath
git pull
# Detect if there are any git changes.
$HasChanges = git status --porcelain
if (-Not $HasChanges)
{