#git-remote #git #git-branch #git-configuration #push #shortcut #set

app git-upstream

A shortcut for git push --set-upstream REMOTE BRANCH

4 stable releases

new 1.5.0 Feb 11, 2025
1.2.0 Sep 23, 2024
1.1.0 Mar 28, 2024
1.0.0 Mar 28, 2024

#2610 in Command line utilities

Download history 2/week @ 2024-12-08 98/week @ 2025-02-09

98 downloads per month

MIT license

19KB
177 lines

git-upstream

Crates.io

A shortcut for git push --set-upstream "$(git remote)" "$(git rev-parse --abbrev-ref HEAD)".

Usage: git-upstream [--fail-fast] [--branch BRANCH] [--remote REMOTE].

Unless --fail-fast is given, all remotes are tried until one succeeds.

Installation

Statically linked binaries are uploaded to GitHub for each release.

With Nix, you can nix run github:9999years/git-upstream -- ....

You can also cargo install git-upstream.

Configuration

You can set ~/.config/git-upstream/config.toml to configure git-upstream:

# Remote names to attempt to push to, highest preference first.
remotes = [
  # "my-employer",
  # "my-github-username",
  # "fork",
  "origin",
]

Dependencies

~12–24MB
~352K SLoC