Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeforePush

PyPI version Python 3.13+ License Tests

BeforePush logo

A lightweight CLI that checks whether your Git branch is ready before pushing or opening a pull request.

Features

  • Check if the current directory is a Git repository
  • Show the current branch
  • Detect uncommitted or untracked changes
  • Check upstream branch configuration
  • Check if the current branch is behind a target branch
  • Show repository and Git-state diagnostics with --verbose or -v
  • Run checks automatically before git push with a pre-push hook
  • Support custom target branches
  • Warn about newly staged files larger than 5 MB (configurable)
  • Clean terminal output with Rich

Installation

Install BeforePush from PyPI:

pip install before-push

Usage

Run BeforePush inside a Git repository:

beforepush

To specify a different target branch:

beforepush --target develop

For detailed usage, including the --max-file-size option and Git pre-push hook instructions, see the documentation.

Demo

beforepush

Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, testing, and contribution guidelines.

Contributors

Thanks to everyone who contributes to BeforePush! ❤️

Scope

BeforePush focuses on local Git branch readiness.

It does not create or merge pull requests, authenticate with GitHub, perform code reviews, manage remote repositories, or modify Git history.

License

This project is licensed under the MIT License.

About

A CLI that checks Git branches for common issues before pushing or opening a pull request.

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages