A command-line utility to start your development day with updated repositories.
GMG (Good Morning Git) is an enhanced git repository management tool that helps developers quickly update their repositories at the start of each day. It automatically handles local changes, performs clean updates, and provides comprehensive reporting.
- 🔍 Smart Change Detection: Automatically detects and stashes local changes
- 🔄 Clean Updates: Uses
git pull --rebasefor clean commit history - 📦 Safe Stashing: Automatically stashes and reapplies local changes
- 🎯 Flexible Targeting: Update single repositories or entire folders
- 📊 Comprehensive Reporting: Detailed status reports and error handling
- ⚡ Fast Execution: Efficient batch processing of multiple repositories
- Copy the
gmg.batfile to a directory in your PATH, or - Create a shortcut to
gmg.batin a convenient location, or - Run directly from the
gmg-utilfolder
# Update a specific repository
gmg -repo <repository-name>
# Update all repositories in a folder
gmg -folder <parent-folder-path>
# Show help information
gmg -help# Update a single repository (relative path)
gmg -repo next-steps-idaho-2
# Update a single repository (absolute path)
gmg -repo "D:\Projects\my-app"
# Update all repositories in current folder
gmg -folder .
# Update all repositories in a specific folder
gmg -folder "D:\ParentFolder\Code"
# Update all repositories in a relative folder
gmg -folder "../other-projects"For each repository, GMG performs these steps:
- 🔍 Check for Changes: Scans for uncommitted local changes
- 📦 Stash if Needed: Safely stashes any local modifications
- 🔄 Fetch Updates: Downloads latest changes from remote
- 📈 Pull & Rebase: Updates local branch with clean history
- 📤 Restore Changes: Reapplies previously stashed changes
- ✅ Report Status: Shows success/failure and final state
- Never Loses Work: Local changes are always preserved via stashing
- Conflict Detection: Handles merge conflicts gracefully
- Error Recovery: Attempts to restore stashed changes on failure
- Detailed Logging: Shows exactly what happened in each repository
- Rollback Support: Provides recovery instructions when needed
- ✅ Success: Operation completed successfully
- ❌ Error: Operation failed
⚠️ Warning: Operation succeeded with caveats- 📦 Stash: Local changes were stashed
- 📤 Pop: Stashed changes were reapplied
- 🔄 Fetch: Downloading remote changes
- 📈 Rebase: Updating with rebase
- 📋 Status: Repository status information
GMG provides comprehensive error handling:
- Repository Not Found: Clear message with attempted path
- Not a Git Repo: Verification that target is actually a git repository
- Stash Failures: Detailed error reporting for stashing issues
- Fetch/Pull Failures: Network and merge conflict reporting
- Recovery Instructions: Step-by-step manual recovery when needed
0: All operations successful1: One or more repositories had errorsExit codes match error count for automation scripts
Add GMG to your daily startup routine:
- Morning Routine: Run
gmg -folder .in your main projects directory - Project Switch: Use
gmg -repo <name>when switching between projects - Pre-Development: Ensure you're working with latest code before starting work
Create project-specific batch files:
@echo off
echo Starting work on NSI projects...
gmg -folder "D:\Support"
pauseSet up Windows scheduled tasks to run GMG automatically:
# Task Scheduler command
gmg -folder "D:\Projects" > daily_update.log 2>&1- "Repository not found": Check path spelling and existence
- "Not a git repository": Ensure the folder contains a
.gitdirectory - "Failed to stash": May indicate file permission issues
- "Failed to reapply stash": Usually indicates merge conflicts
If GMG fails to reapply stashed changes:
cd <repository-path>
git stash list # See available stashes
git stash pop # Reapply most recent stash
git status # Check for conflicts- v1.0.0: Initial release with core functionality
- Single repository updates
- Folder-based bulk updates
- Automatic stashing and recovery
- Comprehensive error reporting
GMG is part of utilities. Suggestions and improvements are welcome!
Good Morning Git - Start your day right! 🌅☕