Skip to content

Commit

Permalink
docs: update GCOP command documentation and add new aliases
Browse files Browse the repository at this point in the history
- Add `git ghelp` command documentation
- Add `git acp` command alias for `git add . && git gcommit && git push`
- Add `git amend` command alias for `git commit --amend`
- Update existing command descriptions for clarity

These changes improve the usability of GCOP by providing clearer documentation and simplifying common command sequences.
  • Loading branch information
Undertone0809 committed Nov 7, 2024
1 parent b0168d9 commit 94ffcb2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
28 changes: 22 additions & 6 deletions docs/guide/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ GCOP enhances your Git workflow with several powerful commands. Here's a compreh

## Basic Commands

### `git ghelp`

Show the help message with a list of available GCOP commands.

### `git gcommit` or `git c`

Generate an AI-powered commit message based on staged changes and commit them.
Expand All @@ -23,21 +27,37 @@ Generate an AI-powered commit message based on staged changes and commit them.

Add all changes and commit with an AI-generated message.

The same as `git add . && git gcommit`.

### `git acp`

Add all changes, commit with an AI-generated message, and push to the remote repository.

The same as `git add . && git gcommit && git p`.

### `git p`

Push changes to the remote repository.

The same as `git push`.

### `git pf`

Force push changes to the remote repository (use with caution).

The same as `git push --force`.

### `git undo`

Undo the last commit while keeping changes staged.

### `git ghelp`
The same as `git reset HEAD~`.

Show the help message with a list of available GCOP commands.
### `git amend`

Amend the last commit, allowing you to modify the commit message or add changes to the previous commit.

The same as `git commit --amend`.

### `git gconfig`

Expand All @@ -53,10 +73,6 @@ Display detailed information about the current git repository. This command prov
- Version control information (latest tag, branch count, untracked files)
- Advanced details (submodules, latest merge commit, file type statistics)

### `git amend`

Amend the last commit, allowing you to modify the commit message or add changes to the previous commit. The same as `git commit --amend`.

## Usage Examples

1. Generate and apply an AI commit message:
Expand Down
2 changes: 2 additions & 0 deletions gcop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ def help_command():
git gcommit Generate a git commit message based on the staged changes and commit the changes
git c The same as `git gcommit` command
git ac The same as `git add . && git gcommit` command
git acp The same as `git add . && git gcommit && git push` command
git amend Amend the last commit, allowing you to modify the commit message or add changes to the previous commit
git info Display basic information about the current git repository
""" # noqa

Expand Down

0 comments on commit 94ffcb2

Please sign in to comment.