Skip to content

Commit c43c357

Browse files
committed
docs(readme): change wording, add badges, contributing section
1 parent d45d6d9 commit c43c357

File tree

1 file changed

+47
-34
lines changed

1 file changed

+47
-34
lines changed

README.md

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
# git-merged-branches CLI
1+
# git-merged-branches
22

3-
`git-merged-branches` is a simple command-line utility that allows you to view all branches that have been merged into a selected base branch, such as master.
3+
[![npm version](https://img.shields.io/npm/v/git-merged-branches)](https://www.npmjs.com/package/git-merged-branches)
4+
[![build](https://github.com/VChet/git-merged-branches/actions/workflows/build.yml/badge.svg)](https://github.com/VChet/git-merged-branches/actions/workflows/build.yml)
5+
6+
**git-merged-branches` is a command-line utility to view branches merged into a selected base branch (e.g., master or main).**
7+
8+
- CLI usage
9+
- customizable via `package.json`
410

511
## Installation
612

7-
To install `git-merged-branches` globally, use the following command:
13+
Install globally to use `git-merged-branches` or the shorter version `gmb`:
814

915
```bash
1016
npm install --global git-merged-branches
1117
```
1218

13-
## Usage
19+
Or use it without installation via [npx](https://docs.npmjs.com/cli/v7/commands/npx):
1420

15-
After installation, you can use the `git-merged-branches` command in your terminal. By default, it will show a list of branches that have been merged into the base branch (e.g., master or main).
21+
```bash
22+
npx git-merged-branches
23+
```
1624

17-
The utility checks for the default base branch (**master** or **main**), and if neither exists, it will notify you.
25+
## Usage
1826

19-
When you run the `git-merged-branches` command, it will show a list of branches that have been merged into the base branch:
27+
By default, the command shows merged branches into the base branch (**master** or **main**). If neither exists, it will notify you.
28+
29+
Example output:
2030

2131
```bash
2232
$ git-merged-branches
@@ -26,26 +36,23 @@ bugfix/fix-crash-on-start
2636
hotfix/urgent-fix
2737
```
2838

29-
Also, you may use `gmb` as an alias for `git-merged-branches`.
30-
3139
## Configuration
3240

33-
You can configure the behavior of the `git-merged-branches` command by adding a `git-merged-branches` object to your `package.json`.
34-
The configuration allows you to specify:
41+
You can configure the utility in your `package.json` under `git-merged-branches`. This allows you to set:
3542

36-
- **issueUrlFormat**: The base URL for your issue tracker. Must be a valid URL. If it's not, the utility will warn you.
37-
- **issueUrlPrefix**: The prefix used to identify issues in branch names. Must consist of letters. If it's not, the utility will warn you.
43+
- **issueUrlFormat**: Base URL for your issue tracker (must be a valid URL).
44+
- **issueUrlPrefix**: Prefix for issue identifiers in branch names (must be letters).
3845

39-
Here is an example of how to add the configuration:
46+
Example configuration:
4047

4148
```json
4249
"git-merged-branches": {
4350
"issueUrlFormat": "https://your-jira-instance.net",
44-
"issueUrlPrefix": "TOKEN-"
51+
"issueUrlPrefix": "TOKEN"
4552
}
4653
```
4754

48-
With this configuration, `git-merged-branches` will detect branches with the prefix **TOKEN** and generate links to the issue tracker:
55+
With this setup, `git-merged-branches` will generate links for branches with such tokens in their name:
4956

5057
```bash
5158
$ git-merged-branches
@@ -56,33 +63,39 @@ fix/EXTERNAL-391
5663
hotfix
5764
```
5865

59-
If the configuration is invalid, `git-merged-branches` will display warnings and skip formatting the issue URLs.
66+
If the configuration is invalid, warnings will be shown and the utility will skip formatting URLs.
6067

6168
## Development
6269

63-
- Clone the repository:
70+
To contribute or test locally:
71+
72+
1. Clone the repository:
6473

65-
```bash
66-
git clone https://github.com/VChet/git-merged-branches.git
67-
cd git-merged-branches
68-
```
74+
```bash
75+
git clone https://github.com/VChet/git-merged-branches.git
76+
cd git-merged-branches
77+
```
6978

70-
- Install dependencies:
79+
1. Install dependencies:
7180

72-
```bash
73-
npm install
74-
```
81+
```bash
82+
npm install
83+
```
7584

76-
- Build:
85+
1. Build the project:
7786

78-
```bash
79-
npm run build
80-
```
87+
```bash
88+
npm run build
89+
```
8190

82-
- Link it locally for testing:
91+
1. Link it locally for testing:
8392

84-
```bash
85-
npm link
86-
```
93+
```bash
94+
npm link
95+
```
8796

8897
Now you can run `git-merged-branches` on your local machine.
98+
99+
## Contributing
100+
101+
If you have any ideas, bug reports, or feature requests, feel free to [contribute](https://github.com/VChet/git-merged-branches/pulls) or report [issues](https://github.com/VChet/git-merged-branches/issues).

0 commit comments

Comments
 (0)