Skip to content

Commit

Permalink
docs(ref): Document actions
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 21, 2021
1 parent 5f22bbe commit 7687724
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,6 @@ at a time within a stack. If you really need to, you can direct your reviewers
to the commits within each PR to look at. However, you will see the CI run
status of top commit for each PR dependency.

## When does `git-stack` consider a branch ready to be pushed?

A branch is ready if
- It is not stacked on top of any other development branches (see "How do I stack my PRs in Github")
- It has no WIP commits

We consider branches with [`fixup!`
commits](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
to be ready in case you are wanting reviewers to see some intermediate states.
You can use a tool like [committed](https://github.com/crate-ci/committed) to
prevent these from being merged.

## When is a commit considered WIP?

If a commit summary is only `WIP` or is prefixed by:
Expand Down
42 changes: 42 additions & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# `git-stack` Reference

## Actions

### `--pull`

Pulls your protected branches from the `stack.pull-remote` and then rebases
your development branches on top of their relevant protected branches.

Unlike `--rebase`, this does not perform any "auto" operations.

Note:
- This also performs a fetch of your `stack.push-remote` to take advantage of
[`fetch.prune`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-fetchprune)
(`git config --global fetch.prune true`).

### `--rebase`

Rebase development branches on their relevant protected branches.

This performs "auto" operations, like
- `stack.auto-fixup`: see `--fixup`

### `--fixup <action>`

Process [fixup!](https://git-scm.com/docs/git-config#Documentation/git-config.txt-fetchprune) commits according to the specified action.

Note:
- This can be used to override `stack.auto-fixup` during a `--rebase`.

### `--push`

Push all "ready" development branches to your `stack.push-remote`.

A branch is ready if
- It is not stacked on top of any other development branches (see ["How do I stack my PRs in Github"](../README.md#how-do-i-stack-my-prs-in-github))
- It has no [WIP commits](../README.md#when-is-a-commit-considered-wip)

We consider branches with
[`fixup!` commits](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
to be ready in case you are wanting reviewers to see some intermediate states.
You can use a tool like [committed](https://github.com/crate-ci/committed) to
prevent these from being merged.

## Configuration

### Sources
Expand Down

0 comments on commit 7687724

Please sign in to comment.