Stax for Git by Taras Mazepa

stax for git - simplify your day to day git tasks, stacked PR ready

Are you new to Git? Check out our Stax Onboarding Guide for Beginners!

Installation

MacOS

Homebrew is a package manager for MacOS.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install stax

brew install TarasMazepa/stax/stax

Windows

Chocolatey is a package manager for Windows.

Follow this guide to install chocolatey.

Install stax

choco install stax

Linux/WSL on Windows/ChromeOS

Homebrew is a package manager for MacOS that also works on Linux systems.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install stax

brew install TarasMazepa/stax/stax

Alternative

Clone this repo and put the path to the repo's path folder into your PATH variable. You would need to have dart installed on your system.

stax doctor

Will help you to set up everything that stax needs to start working

stax doctor
[V] git config --get user.name # Taras Mazepa
[V] git config --get user.email # 6552358+TarasMazepa@users.noreply.github.com
[V] git remote # remote(s): origin
[V] git rev-parse --abbrev-ref origin/HEAD # main

Commands

To see the full list of commands, run:

stax help

Here is the list of commands currently available. Note: you can type the first letter or couple of letters instead of the full command name (e.g., c for commit, am for amend).

stax commit (alias: c)

Creates a branch, commits current changes with the same name as the branch, and pushes it to remote. First argument is the mandatory commit message. Second argument is an optional branch name; if not provided, the branch name is generated from the commit message.

Positional arguments:

Flags:

stax commit "two-in-one-commit-name-and-branch-name"

Result:

commit 8161c952fbed66672aff80cd3d1233589cdc3c0c (HEAD -> two-in-one-commit-name-and-branch-name, origin/two-in-one-commit-name-and-branch-name)
Author: Taras Mazepa <taras.mazepa@example.com>
Date:   Fri Sep 8 14:58:04 2023 -0700

    two-in-one-commit-name-and-branch-name

You can see that a branch with two-in-one-commit-name-and-branch-name name was created as well as a commit with the same name two-in-one-commit-name-and-branch-name.


stax amend (alias: a)

Amends to the current commit and force pushes the branch.

Flags:

stax amend

stax delete-stale (alias: d)

Deletes local branches with gone remotes. It is useful when you are using stax commit, which pushes all the branches. So once they are merged and deleted from the remote, you can clean up local branches.

Flags:


stax pull (alias: p)

Switching to the main branch, pulling all the changes, deleting gone branches, and switching to the original branch.

Positional arguments:

Flags:


stax log

Outputs tree structure of your branches.

Flags:

> stax log
  x Updates-stax-log-example-in-readme
  o Adds-stax-log-example-to-readme
o-┘ origin/main, origin/HEAD, main
| o Promotes-version-command-to-be-not-hidden-command
o-┘

stax rebase

Rebase tree of branches on top of the main branch.

Positional arguments:

Flags:


stax move

Allows you to move around log tree. Note: you can type any amount of first letters to specify direction. 'h' instead of 'head', 't' for 'top, 'd' for down, 'u' for 'up', 'b' for 'bottom', 'l' for 'left', 'r' for 'right'.

Directions:


stax get

(Re)Checkout specified branch and all its children.

Positional arguments:

Flags:


stax pull-request (alias: pr)

Creates a pull request.


stax extras (alias: e)

Extra non-primary commands (about, agents.md, changelog, doctor, help, nuke, settings, update, version). Run stax extras to see detailed list.

Positional arguments:


Global Flags

These flags apply globally to most commands:

Videos

Why stack pull request?

Checking out stacking workflow

Alternatives (alphabetical order)