Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 32 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ This tool provides advanced Git feature management, allowing you to associate fe

## Commands Overview

### `git feature-status`
### `git feature status`

Displays the current feature status, including staged, unstaged, and untracked files with their associated features.

**Usage**:
```bash
git feature-status
git feature status
```
### `git feature-add`
### `git feature add`
This command helps to associate feature information with a commit that does not yet exist. You can either add the information while adding the files or add features to the staging area.
If you prefer to keep your workflows as usual and add feature information solely to commits that you already created, you don't need the git hooks and can jump to `git feature-commit`.

#### `git feature-add by-add`
#### `git feature add`

Associates specified features with staged files. You can stage specific files or all tracked changes.

Expand All @@ -51,62 +51,65 @@ Associates specified features with staged files. You can stage specific files or

**Usage**:
```bash
git feature-add by-add --all <feature-names>
git feature-add by-add --files <file>... <feature-names>
git feature add --all <feature-names>
git feature add --files <file>... <feature-names>
```

#### `git feature-add from-staged`
#### `git feature add-from-staged`

Uses staged files to associate them with feature information.

**Usage**:
```bash
git feature-add from-staged
git feature add-from-staged
```


### `git feature-commit`
### `git feature commit`
Assign features to a commit retroactively. To find all commits that have not yet features assigned, see ---
**Usage**:
```bash
git feature-commit <commit> <features>
git feature commit <commit_id> <features>
```

### `git feature-blame`
### `git feature blame`

Displays the feature associations for each line of a specified file, similar to `git blame`.

**Usage**:
```bash
git feature-blame <file>
git feature blame <file>
```

### `git feature-info`
### `git feature info`

Displays detailed information about a feature, including associated commits, files, authors, and branches.

**Options**:
- `--authors`: Lists the authors who contributed to the feature.
- `--files`: Lists the files associated with the feature.
- `--branches`: Lists the branches where the feature is found.
- `--branches`: Lists the branches where the feature is present.
- `--updatable`: Check if the feature has updates available on other branches and list the update options.
- `--branch <branch_name>`: Specify a branch for checking updates (used with `--updatable`).

**Usage**:
```bash
git feature-info <feature>
git feature-info <feature> --authors --files --branches
git feature info <feature>
git feature info <feature> --authors --files --branches
```

### `git feature-commits`
### `git feature commits`

Lists all commits associated with a feature or shows commits that are missing feature associations.

**Options**:
- `--missing`: Lists commits that do not have any associated feature.
**Commands**:
- `missing`: Lists commits that do not have any associated feature.
- `list`: List commits that are associated to features.

**Usage**:
```bash
git feature-commits
git feature-commits --missing
git feature commits list
git feature commits missing
```

---
Expand All @@ -115,38 +118,38 @@ git feature-commits --missing

1. **Check Feature Status**:
```bash
git feature-status
git feature status
```

2. **Add Features to All Files**:
```bash
git feature-add by-add --all "new-feature"
git feature add --all "new-feature"
```

3. **Add Features to Specific Files**:
```bash
git feature-add by-add --files src/main.py "feature-x"
git feature add --files src/main.py "feature-x"
```

4. **Use Staged Files for Feature Information**:
```bash
git feature-add from-staged
git feature add-from-staged
```

5. **Show Feature Associations for a File**:
```bash
git feature-blame src/main.py
git feature blame src/main.py
```

6. **Display Feature Information**:
```bash
git feature-info feature-x --authors --files --branches
git feature info feature-x --authors --files --branches
```

7. **List All Commits With and Without Features**:
```bash
git feature-commits
git feature-commits --missing
git feature commits list
git feature commits missing
```

---
Expand Down
26 changes: 26 additions & 0 deletions git_tool/helpdoc/git-feature.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.TH git-feature 1 "12 April 2025" "Kim Nguyen" "git-feature(1) Manual Page"
.SH NAME
git-feature - Manage feature metadata and inspect feature-related information

.SH SYNOPSIS
.P
\fB git feature status \fP
.P
\fB git feature add \fP <feature_names> [-a | --all | -f <file_name> | --files <file_name>]
.P
\fB git feature add-from-staged \fP
.P
\fB git feature commit \fP <commit_id> [--features <feature_name>]
.P
\fB git feature commits missing \fP
.P
\fB git feature commits list \fP
.P
\fB git feature blame \fP <file_name>
.P
\fB git feature info-all \fP
.P
\fBgit feature info\fP <feature_name> [--authors | --files | --branches | --updatable | --branch <branch_name>]

.SH COMMANDS
With no arguments, shows the help text. Several subcommands are available to perform operations on the feature metadata.
Loading