gps 7.3.3

Official CLI & library for Git Patch Stack
Documentation
.TH "GPS" "1" "2022-06-01" "Git Patch Stack Manual"

.SH NAME
gps \- Git Patch Stack command line interface

.SH SYNOPSIS
\fBgps add\fR
[\fB\-\-all\fR | \fB\-A\fR]
[\fB\-\-edit\fR | \fB\-e\fR]
[\fB\-\-patch\fR | \fB\-p\fR]
[\fB\-\-interactive\fR | \fB\-i\fR]
[\fB\-\-help\fR | \fB\-h\fR]
[\fB\-\-version\fR | \fB\-V\fR]
[\fIpathspec ...\fR]

.SH DESCRIPTION
This command updates the Git index using the content in the current tree
referenced by the \fIpathspec ...\fR It is intended to be a simplified interface
to facilitate this and to help provide a more complete abstraction over Git.

This command doesn't have to be used. You are welcome to drop down to the
lower level abstraction of Git and use the git-add command instead. Please see
git-add(1) for details on using it.

.SH OPTIONS
.TP
\fIpathspec ...\fR
Files to add content from\&. Fileglobs (e\&.g\&. \fB*\&.c\fR) can be given to
add all matching files\&. Also a leading directory name (e\&.g\&. \fBdir\fR to
add \fBdir/file1\fR and \fBdir/file2\fR) can be given to update the index to
match the current state of the directory as a whole (e\&.g\&. specifying
\fBdir\fR will record not just a file \fBdir/file1\fR modified in the working
tree, a file \fBdir/file2\fR added to the working tree, but also a file
\fBdir/file3\fR removed from the working tree)\&. Note that older versions of
Git used to ignore removed files; use \fB\-\-no\-all\fR option if you want to
add modified or new files but ignore removed ones.

For more details about the \fIpathspec\fR syntax, see the \fIpathspec\fR entry
in gitglossary(7).

.TP
\fB\-A\fR, \fB\-\-all\fR
Update the index not only where the working tree has a file matching
\fIpathspec\fR but also where the index already has an entry. This adds,
modifies, and removes index entries to match the working tree.

If no \fIpathspec\fR is given when \fB-A\fR option is used, all files in the
entire working tree are updated (old versions of Git used to limit the update
to the current directory and its subdirectories).

.TP
\fB\-e\fR, \fB\-\-edit\fR
Open the diff vs. the index in an editor and let the user edit it. After the
editor was closed, adjust the hunk headers and apply the patch to the index.

The intent of this option is to pick and choose lines of the patch to apply,
or even to modify the contents of lines to be staged. This can be quicker and
more flexible than using the interactive hunk selector. However, it is easy to
confuse oneself and create a patch that does not apply to the index.

.TP
\fB\-i\fR, \fB\-\-interactive\fR
Add modified contents in the working tree interactively to the index.
Optional path arguments may be supplied to limit operation to a subset of the
working tree.

.TP
\fB\-p\fR, \fB\-\-patch\fR
Interactively choose hunks of patch between the index and the work tree and
add them to the index. This gives the user a chance to review the difference
before adding modified contents to the index.

This effectively runs \fBadd \-\-interactive\fR, but bypasses the initial
command menu and directly jumps to the \fBpatch\fR subcommand.

.TP
\fB\-h\fR, \fB\-\-help\fR
Display the help message for the \fBadd\fR command.

.TP
\fB\-V\fR, \fB\-\-version\fR
Display the version of the \fBgps\fR program.

.SH EXAMPLES
To see examples please see the EXAMPLES section of git-add(1) as the \fBgps
add\fR command is a light weight proxy to the \fBgit-add\fR command.

.SH INTERACTIVE MODE
For details on interactive mode see the INTERACTIVE MODE section of git-add(1)
as the \fBgps add\fR command is a light weight proxy to the \fBgit-add\fR
command.

.SH EDITING PATCHES
For details on editing patches see the EDITING PATCH section of git-add(1)
as the \fBgps add\fR command is a light weight proxy to the \fBgit-add\fR
command.

.SH SEE ALSO
gps-status(1) gps-unstage(1) gps-create-patch(1) gps-list(1)

.SH GIT PATCH STACK
Part of the gps(1) suite