Stacked Git logo

Stacked Git

stg-init(1)

NAME

stg-init - Initialize a StGit stack on a branch

SYNOPSIS

stg init [OPTIONS]

DESCRIPTION

Initialize a StGit stack on a branch.

Initializing a branch with a StGit stack commits initial, empty stack state for the branch to the repository. Theses stack metadata commits are tracked by the refs/stacks/<branch> reference. Updated stack state is committed by each StGit command that modifies the stack. StGit users do not have to do anything with the refs/stacks/<branch> ref directly.

Some StGit commands, such as stg new and stg uncommit, will automatically initialize the stack, so it is often not necessary to explicitly initialize the stack on a branch. Also, branches created with stg branch --create are automatically initialized.

The branch must already exist and point to a commit before initializing a StGit stack.

StGit stack metadata can be deinitialized from a branch using stg branch --cleanup. See stg branch for more details.

OPTIONS

-b <branch>
--branch=<branch>

Use <branch> instead of current branch

StGit

Part of the StGit suite - see stg(1)