git-stack-cli 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -58,6 +58,15 @@ git stack --no-verify # skip git hooks such as pre-commit and pre-push
58
58
  git stack help # print a table of all CLI arguments
59
59
  ```
60
60
 
61
+ ### Adding new commits and pull requests
62
+
63
+ Adding commits to a PR is as simple as running `git stack` and adding commits to a PR.
64
+
65
+ 1. Run `git stack`
66
+ 1. Press `c` to create a new PR
67
+ 1. Use `↑↓` and `space`/`enter` to navigate and assign commits to the PR
68
+ 1. Press `s` to sync created PRs and commits to Github
69
+
61
70
  ### Editing existing commits and pull requests
62
71
 
63
72
  Sometimes you want to add changes to an existing commit or pull request.
@@ -87,19 +96,29 @@ To update your local branch with the latest changes in the remote branch (e.g. `
87
96
  git stack rebase
88
97
  ```
89
98
 
90
- ### Customizing branch name
99
+ ### Branch names
100
+
101
+ By default `git stack` generates a unique identifier and appends it to your local branch name.
91
102
 
92
- By default `git stack` generates a unique branch name such as `gs-3cmrMBSUj`.
103
+ For example, if you are locally working in `dev/feature-a`, PRs branch names will look like `dev/feature-a-3cmrMBSUj`.
93
104
 
94
- You can specify a prefix for the generated branch name by using either the environment variable or the command line option.
95
- In the example below branches would be generated such as `dev/magus/gs-3cmrMBSUj`.
105
+ ### Overriding defaults
106
+
107
+ `git stack` has many optional flags to control its behavior.
108
+ You can view them by running `git stack help` and set them as needed.
109
+
110
+ If you prefer to set them once in your environment, you can use the command below to generate a one-time configuration.
96
111
 
97
112
  ```bash
98
- GIT_STACK_BRANCH_PREFIX="dev/magus/" git stack
113
+ git stack config --draft --force
99
114
 
100
- git stack --branch-prefix="dev/magus/"
115
+ Add the line below to your shell rc file (.zshrc, .bashrc, etc.)
116
+
117
+ export GIT_STACK_CONFIG="{\"draft\":true,\"force\":true}"
101
118
  ```
102
119
 
120
+ Copy this environment variable into your shell configuration, e.g. `.zshrc`, `.bashrc`, etc.
121
+
103
122
  ## Why?
104
123
 
105
124
  The goal of `git stack` is to combine the **simplicity of developing in a single branch** in order to **preserve your commit history** while also **grouping commits into pull requests for code review**.