A collection of custom Git tools to streamline branch management and synchronization workflows. These scripts are designed to solve common Git workflow pain points, particularly when managing multiple branches in complex development scenarios.
| Tool | Description | Use Case |
|---|---|---|
| chain-sync | Synchronize multiple branches in sequence with build validation | When you need to propagate changes across a branch hierarchy |
| multiple-push | Push multiple branches to remote with flexible options | When you need to push several branches at once with different push strategies |
- Clone or download this repository to
~/.git-tweaks/ - Add the git aliases using the following commands:
git config --global alias.chain-sync '!bash ~/.git-tweaks/chain-sync/chain-sync.sh'
git config --global alias.multiple-push '!bash ~/.git-tweaks/multiple-push/multiple-push.sh'- Make the scripts executable:
chmod +x ~/.git-tweaks/chain-sync/chain-sync.sh
chmod +x ~/.git-tweaks/multiple-push/multiple-push.sh# Sync a branch hierarchy: main -> develop -> feature-a -> feature-b
git chain-sync main develop feature-a feature-b# Push multiple branches to origin
git multiple-push origin main develop feature-a feature-b- Interactive prompts for build checks and merge strategies
- Build validation with customizable commands
- Flexible merge strategies (merge vs rebase)
- Safe force-push options with
--force-with-lease - Colorful output for better readability
- Error handling with detailed feedback
- Git 2.0 or higher
- Bash shell
- Standard Unix utilities (no external dependencies)
Feel free to submit issues or pull requests to improve these scripts. When contributing:
- Follow the existing code style and conventions
- Test your changes thoroughly
- Update documentation as needed
This project is open source and available under the MIT License.