Skip to content

eeoom/gitflowremote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ git-flow-sync

A CLI tool that extends Git Flow with automatic remote synchronization, branch cleanup, and enhanced workflow automation for teams.


🧩 Features

  • Start or finish feature, release, hotfix, and support branches
  • Automatically push updates and tags to remote
  • Delete remote branches after finishing a flow
  • Auto-detect and clean up local branches tracking deleted remotes
  • Auto-stash uncommitted changes for safety
  • Optional CI/CD trigger via --ci-url
  • Dry run and verbose output modes

πŸ“¦ Installation

  1. Save the script file:
  2. Make it executable:
    chmod +x git-flow-sync-extended.sh
  3. (Optional) Move it into your $PATH:
    sudo mv git-flow-sync-extended.sh /usr/local/bin/git-flow-sync

βš™οΈ Requirements

  • git
  • git-flow (initialized in your repo)
  • Unix-compatible shell (Bash)

πŸ”§ Usage

git-flow-sync [--dry-run] [--verbose] [--force] [--ci-url <url>] <start|finish|cleanup> [feature|release|hotfix|support] <branch-name>

βœ… Commands

Command Description
start Start a new Git Flow branch and push to remote
finish Finish a Git Flow branch, push target branch and tags, delete remote branch
cleanup Remove local branches that track deleted remote branches ([gone])

βš™οΈ Options

Option Description
--dry-run Show actions without executing
--verbose Show detailed output of every command
--force Auto-delete stale local branches without confirmation
--ci-url <url> Send a POST request to the given URL after finishing a branch

πŸ” Examples

Start a feature and push

git-flow-sync start feature navbar-update

Finish a release and trigger CI

git-flow-sync finish release v1.4.0 --ci-url https://ci.example.com/deploy

Safely cleanup tracking-deleted local branches

git-flow-sync cleanup --verbose

Force delete all stale local branches (no prompt)

git-flow-sync cleanup --force

πŸ” Safety

  • Uncommitted changes are auto-stashed before finish
  • Never deletes local branches without prompt (unless --force is set)
  • Supports --dry-run for all destructive operations

πŸ“„ License

MIT – Free to use and adapt.


✨ Created by

Built to make Git Flow actually flow β€” cleanly, safely, and with fewer manual steps.

About

gitflow wrapper which syncs the remote repository too

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages