Skip to content

Commit ec7bd5b

Browse files
committed
docs: update command descriptions and add new alias
- Add description for `git p` command - Modify `git acp` and `git cp` command descriptions - Add new git alias `cp` to combine commit and push commands This update improves the clarity of command descriptions and adds a new convenience alias for committing and pushing changes in one step.
1 parent e48bc85 commit ec7bd5b

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/guide/commands.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,23 @@ Add all changes and commit with an AI-generated message.
2929

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

32+
### `git p`
33+
34+
Push changes to the remote repository.
35+
36+
The same as `git push`.
37+
3238
### `git acp`
3339

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

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

38-
### `git p`
44+
### `git cp`
3945

40-
Push changes to the remote repository.
46+
Commit with an AI-generated message and push to the remote repository.
4147

42-
The same as `git push`.
48+
The same as `git gcommit && git p`.
4349

4450
### `git pf`
4551

gcop/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ def init_command():
170170
check=True,
171171
encoding="utf-8",
172172
)
173+
subprocess.run(
174+
["git", "config", "--global", "alias.cp", "!gcop commit && git push"],
175+
check=True,
176+
encoding="utf-8",
177+
)
173178
subprocess.run(
174179
["git", "config", "--global", "alias.info", "!gcop info"],
175180
check=True,
@@ -500,6 +505,7 @@ def help_command():
500505
git c The same as `git gcommit` command
501506
git ac The same as `git add . && git gcommit` command
502507
git acp The same as `git add . && git gcommit && git push` command
508+
git cp The same as `git gcommit && git push` command
503509
git amend Amend the last commit, allowing you to modify the commit message or add changes to the previous commit
504510
git info Display basic information about the current git repository
505511
""" # noqa

0 commit comments

Comments
 (0)