gitbash 1.6.2 → 1.6.4

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
@@ -1,8 +1,9 @@
1
1
  # gitbash
2
2
 
3
- Interactive git utilities for bash with fzf-powered menus.
3
+ Pure bash, zero dependency git commands. Reduce repetitive typing and supercharge git workflows with interactive previews and safe cleanup - see a [full comparison](./docs/workflows.md).
4
+ Optional interactive previews, feturing [fzf](https://github.com/junegunn/fzf), [delta](https://github.com/dandavison/delta) and [bat](https://github.com/sharkdp/bat)
4
5
 
5
- ![screenshot-status.png](./doc/screenshot-status.png)
6
+ ![screenshot-status.png](./docs/screenshot-status.png)
6
7
 
7
8
  ## Installation
8
9
 
@@ -24,10 +25,8 @@ gitbash --config # Interactive configuration wizard
24
25
  ### Dependencies
25
26
 
26
27
  ```bash
27
- # Required
28
- brew install fzf
29
-
30
28
  # Optional (recommended)
29
+ brew install fzf # Interactive menus and previews
31
30
  brew install git-delta # Better diff highlighting
32
31
  brew install bat # File preview with syntax highlighting
33
32
  ```
@@ -57,6 +56,7 @@ Create feature branch with optional Jira parsing. Updates main first, pushes and
57
56
  **Examples with custom prefix** (`GITBASH_CREATE_BRANCH_PREFIX="awesome-team"`):
58
57
 
59
58
  With issue parsing enabled (default):
59
+
60
60
  ```bash
61
61
  create PROJ-123 fix login bug # → feature/awesome-team/PROJ-123-fix-login-bug
62
62
  create fix bug # → feature/awesome-team/NOISSUE-fix-bug
@@ -65,6 +65,7 @@ create # Interactive mode with Jira prompt
65
65
  ```
66
66
 
67
67
  With issue parsing disabled (`GITBASH_CREATE_NO_ISSUE_PARSING="yes"`):
68
+
68
69
  ```bash
69
70
  create fix login bug # → feature/awesome-team/fix-login-bug
70
71
  create --hotfix enhance security # → hotfix/awesome-team/enhance-security
@@ -74,12 +75,14 @@ create # Interactive mode (no Jira prompt)
74
75
  **Examples with empty prefix** (`GITBASH_CREATE_BRANCH_PREFIX=""`, default):
75
76
 
76
77
  With parsing enabled:
78
+
77
79
  ```bash
78
80
  create PROJ-123 fix bug # → feature/PROJ-123-fix-bug
79
81
  create fix bug # → feature/NOISSUE-fix-bug
80
82
  ```
81
83
 
82
84
  With parsing disabled:
85
+
83
86
  ```bash
84
87
  create enhance login screen # → feature/enhance-login-screen
85
88
  ```
package/bin/gitbash CHANGED
@@ -176,9 +176,9 @@ check_dependencies() {
176
176
  local missing_required=()
177
177
  local missing_optional=()
178
178
 
179
- # Required dependencies
179
+ # Optional dependencies (fzf is optional; commands will try to run without it)
180
180
  if ! command -v fzf >/dev/null 2>&1; then
181
- missing_required+=("fzf")
181
+ missing_optional+=("fzf")
182
182
  fi
183
183
 
184
184
  # Optional dependencies
@@ -201,9 +201,9 @@ check_dependencies() {
201
201
 
202
202
  # Show status of each dependency
203
203
  if command -v fzf >/dev/null 2>&1; then
204
- echo " ✓ fzf (required)"
204
+ echo " ✓ fzf (optional)"
205
205
  else
206
- echo " ✗ fzf (required) - fuzzy finder for interactive selection"
206
+ echo " ✗ fzf (optional) - fuzzy finder for interactive selection"
207
207
  fi
208
208
 
209
209
  if command -v delta >/dev/null 2>&1; then
@@ -0,0 +1,138 @@
1
+ # Contributing to gitbash
2
+
3
+ Thank you for your interest in contributing to gitbash! This document outlines the process and guidelines for contributing to this project.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository
8
+ 2. Clone your fork locally
9
+ 3. Create a feature or bugfix branch (see Branch Naming below)
10
+ 4. Make your changes
11
+ 5. Add a changeset (see Changesets below)
12
+ 6. Push your branch and create a Pull Request
13
+
14
+ ## Branch Naming
15
+
16
+ All contributions **must** be made through feature or bugfix branches. Direct commits to `main` won't be merged.
17
+
18
+ ### Branch naming convention:
19
+ - **Feature branches**: `feature/<issue-number>-<description>` or `feature/NOISSUE-<description>`
20
+ - **Bugfix branches**: `bugfix/<issue-number>-<description>` or `bugfix/NOISSUE-<description>`
21
+
22
+ Examples:
23
+ ```bash
24
+ feature/42-add-rebase-command
25
+ feature/NOISSUE-improve-error-messages
26
+ bugfix/15-fix-stale-branch-filtering
27
+ bugfix/NOISSUE-fix-typo-in-help
28
+ ```
29
+
30
+ You can use the built-in `gitbash create` command to create properly formatted branches:
31
+ ```bash
32
+ ./bin/gitbash create
33
+ ```
34
+
35
+ ## Pull Requests
36
+
37
+ All contributions must be submitted via Pull Request (PR):
38
+
39
+ 1. **One feature/fix per PR** - Keep PRs focused and atomic
40
+ 2. **Descriptive title** - Clearly describe what the PR does
41
+ 3. **Description** - Explain the motivation and implementation details
42
+ 4. **Reference issues** - Link to related issues if applicable
43
+ 5. **Include a changeset** - See below for details
44
+
45
+ ### PR Requirements:
46
+ - [ ] Branch follows naming convention (`feature/*` or `bugfix/*`)
47
+ - [ ] Changeset has been added
48
+ - [ ] Code works as intended
49
+ - [ ] No breaking changes (unless discussed and approved)
50
+
51
+ ## Changesets
52
+
53
+ We use [Changesets](https://github.com/changesets/changesets) to manage versions and changelogs. **Every PR must include a changeset.**.
54
+
55
+ ### How to add a changeset:
56
+
57
+ 1. After making your changes, run:
58
+ ```bash
59
+ npm run changeset
60
+ ```
61
+
62
+ 2. You'll be prompted to select the change type:
63
+ - **patch** - Bug fixes, small improvements (1.0.0 → 1.0.1)
64
+ - **minor** - New features, non-breaking changes (1.0.0 → 1.1.0)
65
+ - **major** - Breaking changes (1.0.0 → 2.0.0)
66
+
67
+ 3. Write a clear, user-facing description of the change:
68
+ ```
69
+ Added --all option to stale command to show all branches by default
70
+ ```
71
+
72
+ 4. A changeset file will be created in `.changeset/` - commit this with your PR:
73
+ ```bash
74
+ ./bin/gitbash commit "feat: Add changeset for stale command enhancement"
75
+ ```
76
+
77
+ ### Example changeset workflow:
78
+
79
+ ```bash
80
+ # 1. Create your feature branch
81
+ ./bin/gitbash create
82
+ # Select "feature", enter "NOISSUE" or issue number, add description
83
+
84
+ # 2. Make your changes
85
+ vim commands/stale.sh
86
+
87
+ # 3. Add a changeset
88
+ npm run changeset
89
+ # Select "minor" (new feature)
90
+ # Enter: "Added --all option to stale command to start in all branches mode"
91
+
92
+ # 4. Commit everything
93
+ ./bin/gitbash commit "feat: add --all option to stale command"
94
+
95
+ # 5. Push and create PR
96
+ ./bin/gitbash pr -p
97
+ ```
98
+
99
+ ### What happens to changesets:
100
+
101
+ When your PR is merged:
102
+ 1. The changeset file is included in the main branch
103
+ 2. When ready for release, maintainers run `npm run version`
104
+ 3. Changesets are consumed and version is bumped
105
+ 4. CHANGELOG.md is automatically updated
106
+ 5. Changes are published with `npm run release`
107
+
108
+ ## Development Guidelines
109
+
110
+ ### Testing your changes:
111
+ ```bash
112
+ # Test the gitbash command directly
113
+ ./bin/gitbash <command>
114
+
115
+ # Example: test the stale command
116
+ ./bin/gitbash stale --all
117
+ ```
118
+
119
+ ### Code style:
120
+ - Follow existing bash script conventions
121
+ - Use shellcheck for linting when possible
122
+ - Keep functions focused and well-documented
123
+ - Include help text for new commands/options
124
+ - Keep the readme updated and as terse as possible
125
+
126
+ ### Documentation:
127
+ - Update command help text (`-h, --help`) for new features
128
+ - Update README.md if adding new commands
129
+ - Add usage examples for new features
130
+
131
+ ## Questions or Issues?
132
+
133
+ If you have questions or run into issues:
134
+ - Check existing issues and discussions
135
+ - Create a new issue for bugs or feature requests
136
+ - Reach out in your PR if you need guidance
137
+
138
+ Thank you for contributing! 🎉 You rock!
@@ -0,0 +1,63 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ The following versions of this project are currently receiving security updates:
6
+
7
+ | Version | Supported |
8
+ |--------|-----------|
9
+ | 1.x.x | ✅ |
10
+ | < 1.0 | ❌ |
11
+
12
+ Security fixes are only applied to the latest minor/patch release of the **1.x.x** series. Older versions must be upgraded to receive patches.
13
+
14
+ ---
15
+
16
+ ## Reporting a Vulnerability
17
+
18
+ We take security vulnerabilities seriously and appreciate your efforts to responsibly disclose them.
19
+
20
+ ### How to Report
21
+
22
+ - **Email:** `matthias.jaeggli@gmail.com`
23
+ - **Do not** open a public GitHub issue for security concerns.
24
+
25
+ ### Response Expectations
26
+
27
+ - We will acknowledge your report **within 48 hours**.
28
+ - You will receive progress updates **at least weekly** until the issue is resolved.
29
+ - If additional information is needed, we will contact you directly.
30
+
31
+ ### After You Report
32
+
33
+ After we receive your report:
34
+
35
+ 1. We assess and validate the vulnerability.
36
+ 2. If confirmed, we classify its severity and begin developing a fix.
37
+ 3. We work with you on a responsible disclosure timeline.
38
+ 4. A patched release is published along with a security advisory.
39
+ 5. If the issue is not accepted, we will explain why.
40
+
41
+ ### Responsible Disclosure
42
+
43
+ To protect users, please avoid public disclosure until:
44
+
45
+ - A fix has been released, **or**
46
+ - 30 days have passed since we acknowledged the report (unless otherwise agreed).
47
+
48
+ ---
49
+
50
+ ## Preferred Report Format
51
+
52
+ When reporting, please include:
53
+
54
+ - A description of the vulnerability.
55
+ - Steps to reproduce or a proof-of-concept.
56
+ - Expected vs. actual behavior.
57
+ - Affected versions.
58
+ - Impact and severity (if known).
59
+ - Optional: suggested remediation ideas.
60
+
61
+ ---
62
+
63
+ Thank you for helping improve the security of this project.
@@ -0,0 +1,30 @@
1
+ # Git Workflows — gitbash vs plain git
2
+
3
+ Gitbash reduces repetitive typing and provides interactive previews and safe cleanup.
4
+
5
+ - Plain git: ~900 typed characters
6
+ - Gitbash: ~300 typed characters
7
+
8
+ | Action / Grouped Steps | gitbash | git |
9
+ | ------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- |
10
+ | Checkout base branch | `switch main` | `git switch main` |
11
+ | Create feature branch (from latest main) | `create PROJ-123 add login` | `git switch -c feature/PROJ-123-add-login main`<br>`git push -u origin feature/PROJ-123-add-login` |
12
+ | Create a stash (WIP) | `stash "WIP PROJ-123 implement login"` | `git stash push -u -m "WIP PROJ-123 implement login"` |
13
+ | Create + switch to another branch (ensure main up-to-date) | `create OTHER-456 fix typo` | `git switch main`<br>`git pull origin main`<br>`git switch -c bugfix/OTHER-456-fix-typo main`<br>`git push -u origin bugfix/OTHER-456-fix-typo` |
14
+ | Implement changes on other branch, commit & push | `commit -p "fix(OTHER-456): fix typo"` | `git add -A`<br>`git commit -m "fix(OTHER-456): fix typo"`<br>`git push -u origin bugfix/OTHER-456-fix-typo` |
15
+ | Switch back to original Jira branch | `switch PROJ-123` | `git switch feature/PROJ-123-add-login` |
16
+ | Verify main was up-to-date at creation time<br>Update feature branch by merging current `main` into it | `update` | `git fetch origin`<br>`git log --oneline HEAD..origin/main`<br>`git pull origin main` (run while on feature branch) |
17
+ | Review changes (status + diff) | `status` | `git status`<br>`git diff` |
18
+ | Stage & commit | `status` → stage<br>`commit -p "PROJ-123: implement feature X"` | `git add -A`<br>`git commit -m "PROJ-123: implement feature X"`<br>`git push origin feature/PROJ-123-add-login` |
19
+ | Create Pull Request (open compare page) | `pr` | Open browser<br>`https://github.com/<owner>/<repo>/compare/feature/PROJ-123-add-login?expand=1` |
20
+ | Merge PR & update local main | `switch main` | `git switch main`<br>`git pull origin main` |
21
+ | Create next branch from latest main | `create PROJ-124 implement next thing` | `git switch -c feature/PROJ-124-new-thing main`<br>`git push -u origin feature/PROJ-124-new-thing` |
22
+ | Clean up merged local branches | `cleanup` | `git fetch --prune origin`<br>`git branch --merged main`<br>`git branch -d <branch>` |
23
+ | List / show stashes | `stashes` | `git stash list`<br>`git stash show -p stash@{0}` |
24
+ | Apply / remove stash | `unstash` | `git stash apply stash@{0}`<br>`git stash drop stash@{0}` |
25
+ | Clean up stashes | `cleanstash` | `git stash clear` |
26
+
27
+ Notes
28
+
29
+ - This document compares a full feature workflow step-by-step.
30
+ - The "gitbash" column assumes the commands from gitbash are installed globally (no `gitbash` prefix). Example Jira keys: `PROJ-123`, `OTHER-456`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitbash",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Opinionated git utilities for bash with fzf-powered menus",
5
5
  "author": "jaggli",
6
6
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  "files": [
30
30
  "bin/",
31
31
  "commands/",
32
- "doc/",
32
+ "docs/",
33
33
  "README.md",
34
34
  "LICENSE"
35
35
  ],
File without changes