Skip to content

Working with Pull Requests

Submitting pull requests

When your local changes are ready, use the following commands to submit your changes upstream:

Branch submission is an idempotent operation: pull requests will be created for branches that don't already have them, and updated for branches that do.

For new pull requests, these commands will prompt you for PR information. For example:

$ gs branch submitTitle: branch submit: Fix directory+ref conflictBody: Press [e] to open nvim or [enter/tab] to skipDraft: [y/N]INF Created #261: https://github.com/abhinav/git-spice/pull/261

Important

Be aware that for stacks with multiple branches, you must have write access to the repository so that you can push branches to it. See Limitations for more information.

Pull Requests created by git-spice will include a navigation comment at the top with a visual representation of the stack, and the position of the current branch in it.

Example of a stack navigation comment

This behavior may be changed with the spice.submit.navigationComment configuration key.

Non-interactive submission

Use the --fill flag (or -c since v0.3.0) provided by all the above commands to fill in the PR information from commit messages and skip the interactive prompts.

$ gs stack submit --fillINF Created #123: https://github.com/abhinav/git-spice/pull/123INF Created #125: https://github.com/abhinav/git-spice/pull/125

Additionally, with gs branch submit, you may also specify title and body directly.