@kaynooo/cli-git 0.7.1 → 0.8.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 +2 -2
- package/dist/gb.js +883 -115
- package/dist/gc.js +236 -48
- package/dist/gst.js +249 -53
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ Prints one line with the branch, its upstream and how far ahead and behind it is
|
|
|
24
24
|
|
|
25
25
|
## gb
|
|
26
26
|
|
|
27
|
-
`gb [branch]` picks a git branch
|
|
27
|
+
`gb [branch]` picks a git branch and switches to it: the branches last checked out first (from the reflog), then the other local ones, then the remote ones with no local branch yet. The header says where HEAD stands, each row how its branch stands against its upstream and whether it is merged into the base. Keys: enter switches (a remote branch gets its tracking branch), ctrl-n creates a branch named after the query, ctrl-d deletes the highlighted local branch with `git branch -d`, ctrl-r fetches and prunes. Without a terminal it lists the branches, as JSON with `--json`.
|
|
28
28
|
|
|
29
29
|
- `gb <branch>` switches without the picker, a bare name finding the remote branch it would create; `gb -` goes back, `gb -c <name>` creates a branch, `gb -d <branch>` deletes a local one.
|
|
30
30
|
- A branch checked out in another worktree needs a `cd`, which a command cannot do for its shell: `gb` prints the worktree's path on stdout and a hint on stderr.
|
|
31
|
-
- Hidden flags for wrappers: `--emit` (with any of the above) prints the command as lines for a shell function to run, `--list` the rows as JSON for term, `--names` the branches with their last commit for shell completions, `--show <branch>` the preview and `--
|
|
31
|
+
- Hidden flags for wrappers: `--emit` (with any of the above) prints the command as lines for a shell function to run, `--list` the rows as JSON for term, `--names` the branches with their last commit for shell completions, `--show <branch>` the preview and `--fetch` what ctrl-r runs.
|
|
32
32
|
- Exit codes: the git command's, 1 when no branch is picked or found, 2 outside a repository.
|
|
33
33
|
|
|
34
34
|
## Library
|