Stacked Git logo

Stacked Git

stg-pull(1)

NAME

stg-pull - Pull changes from a remote repository

SYNOPSIS

stg pull [OPTIONS] [repository]

DESCRIPTION

Pull the latest changes from a remote repository.

The remote repository may be specified on the command line, but defaults to branch.<name>.remote from the git configuration, or "origin" if not configured.

This command works by popping all currently applied patches from the stack, pulling the changes from the remote repository, updating the stack base to the new remote HEAD, and finally pushing all formerly applied patches back onto the stack. Merge conflicts may occur during the final push step. Those conflicts need to be resolved manually.

See git-fetch(1) for the format of remote repository argument.

OPTIONS

-n
--nopush

Do not push back patches after pulling

-m
--merged

Check for patches that may have been merged upstream.

When pushing-back patches, each patch is checked to see if its changes already exist in the just-pulled upstream changes. If a patch’s changes have already been merged upstream, the patch will still exist in the stack, but become empty after the pull operation.

--conflicts[=<policy>]

Either "allow" or "disallow" pushing a patch with conflicts.

Using --conflicts=allow (or just --conflicts) allows pushing a patch that may result in unresolved merge conflicts. The patch will be pushed and files with conflicts will be left with conflict markers to be resolved manually; or the operation undone with stg undo --hard. This is the default behavior and also corresponds to the "stgit.push.allow-conflicts" variable being set to "true".

Using --conflicts=disallow disallows pushing any patch that would result in merge conflicts. The operation will stop on the last patch that can be pushed without conflicts. This behavior can be configured by setting "stgit.push.allow-conflicts" to "false".

StGit

Part of the StGit suite - see stg(1)