gitp-ush

Crates.iogitp-ush
lib.rsgitp-ush
version0.1.0
created_at2025-11-16 02:48:37.584949+00
updated_at2025-11-16 02:48:37.584949+00
descriptionTurn your typo into a feature - 'gitp ush' automatically executes 'git push -u origin '
homepagehttps://github.com/7086cmd/gitp-ush
repositoryhttps://github.com/7086cmd/gitp-ush
max_upload_size
id1935107
size19,791
Ethan Wu (7086cmd)

documentation

https://github.com/7086cmd/gitp-ush#readme

README

gitp-ush

Write gitp ush and execute git push -u origin <current-branch>.

A small demo that turns your typo into a feature - making gitp ush a shortcut for git push with automatic upstream setting.

Features

  • Simple typo-to-feature conversion: gitp ushgit push -u origin <branch>
  • Automatically detects your current git branch
  • Automatically sets upstream tracking
  • Supports additional git push arguments

Installation

cargo build --release

The binary will be created at ./target/release/gitp

Optional: Add to your PATH:

# Copy to a directory in your PATH
sudo cp ./target/release/gitp /usr/local/bin/

# Or add an alias to your shell config (.bashrc, .zshrc, etc.)
alias gitp='/path/to/target/release/gitp'

Usage

Basic usage:

gitp ush

What happens:

Current branch: main
Executing: git push -u origin main
Successfully pushed to origin/main

With additional arguments:

gitp ush --force
gitp ush --tags
gitp ush --force-with-lease

How it works

  1. You run gitp ush (either by typo or intentionally)
  2. The tool detects the current git branch
  3. Executes git push -u origin <branch> with any additional arguments
  4. Sets upstream tracking automatically

Demo Purpose

This demonstrates how to build a simple CLI tool in Rust that:

  • Parses command-line arguments
  • Executes git commands programmatically
  • Provides a better UX by automating common tasks
  • Turns a common typo into a useful feature
Commit count: 0

cargo fmt