git-stack-cli 2.6.1 → 2.7.1
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 +25 -6
- package/dist/js/index.js +612 -497
- package/package.json +1 -1
- package/src/app/App.tsx +3 -0
- package/src/app/AutoUpdate.tsx +204 -168
- package/src/app/SelectCommitRanges.tsx +4 -12
- package/src/command.ts +68 -50
- package/src/commands/Config.tsx +106 -0
- package/src/index.tsx +2 -2
- package/src/types/global.d.ts +1 -1
- package/src/core/gs_short_id.ts +0 -5
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
|
-
###
|
|
99
|
+
### Branch names
|
|
100
|
+
|
|
101
|
+
By default `git stack` generates a unique identifier and appends it to your local branch name.
|
|
91
102
|
|
|
92
|
-
|
|
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
|
-
|
|
95
|
-
|
|
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
|
-
|
|
113
|
+
❯ git stack config --draft --force
|
|
99
114
|
|
|
100
|
-
|
|
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**.
|