Git Workflow
This skill handles git operations securely using mutex locking for commits to prevent concurrency issues.
1. Commit Changes
Context
- Locking: Uses
.git-commit.lockto ensure exclusive access. - Scope: commits should only include files changed in the current task.
Instructions
Acquire Lock:
.\.agent\skills\git-workflow\scripts\acquire-commit-lock.ps1 if ($LASTEXITCODE -ne 0) { throw "Failed to acquire commit lock" }Analyze Changes:
- Verify status and diffs.
- Stage ONLY relevant files (don't use
git add .).
Execute Commit:
# Single Line .\.agent\skills\git-workflow\scripts\execute-git-commit.ps1 -Files @("file1", "file2") -Message "Commit message." # Multi Line .\.agent\skills\git-workflow\scripts\execute-git-commit.ps1 -Files @("file1", "file2") -Message "Title" -AdditionalMessages @("Details")
2. Sync with Remote
Instructions
- Check State:
git status,git log - Pre-Sync: Ensure clean working tree (commit or stash).
- Fetch & Pull:
git fetch origin git pull --rebase origin main - Push:
git push origin main - Combined (Quick):
git fetch origin && git pull --rebase origin main && git push origin main
Converted and distributed by TomeVault — claim your Tome and manage your conversions.