mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
docs(git): Clean up alias and function tables
This commit is contained in:
parent
bc45503bf8
commit
2f683d7a6e
1 changed files with 16 additions and 20 deletions
|
|
@ -234,34 +234,31 @@ branch exists. We do this via the function `git_main_branch`.
|
||||||
These are aliases that have been removed, renamed, or otherwise modified in a way that may, or may not,
|
These are aliases that have been removed, renamed, or otherwise modified in a way that may, or may not,
|
||||||
receive further support.
|
receive further support.
|
||||||
|
|
||||||
| Alias | Command | Modification |
|
| Alias | Command | Modification |
|
||||||
| :------- | :-------------------------------------------------------- | :-------------------------------------------------------- |
|
| :------- | :-------------------------------------------------------- | :-----------------------------------------------------|
|
||||||
| `gap` | `git add --patch` | New alias: `gapa`. |
|
| `gap` | `git add --patch` | New alias: `gapa` |
|
||||||
| `gcl` | `git config --list` | New alias: `gcf`. |
|
| `gcl` | `git config --list` | New alias: `gcf` |
|
||||||
| `gdc` | `git diff --cached` | New alias: `gdca`. |
|
| `gdc` | `git diff --cached` | New alias: `gdca` |
|
||||||
| `gdt` | `git difftool` | No replacement. |
|
| `gdt` | `git difftool` | No replacement |
|
||||||
| `gk` | `gitk --all --branches` | Now aliased to `gitk --all --branches`. |
|
|
||||||
| `glg` | `git log --stat --max-count=10` | Now aliased to `git log --stat --color`. |
|
|
||||||
| `glgg` | `git log --graph --max-count=10` | Now aliased to `git log --graph --color`. |
|
|
||||||
| `gwc` | `git whatchanged -p --abbrev-commit --pretty = medium` | New alias: `gwch`. |
|
|
||||||
| `ggpull` | `git pull origin $(git_current_branch)` | New function: `ggl` (`ggpull` is now aliased to this) |
|
| `ggpull` | `git pull origin $(git_current_branch)` | New function: `ggl` (`ggpull` is now aliased to this) |
|
||||||
| `ggpur` | `git pull --rebase origin $(git_current_branch)` | New function: `ggu` (`ggpur` is now aliased to this) |
|
| `ggpur` | `git pull --rebase origin $(git_current_branch)` | New function: `ggu` (`ggpur` is now aliased to this) |
|
||||||
| `ggpush` | `git push origin $(git_current_branch)` | New function: `ggp` (`ggpush` is now aliased to this) |
|
| `ggpush` | `git push origin $(git_current_branch)` | New function: `ggp` (`ggpush` is now aliased to this) |
|
||||||
|
| `gwc` | `git whatchanged -p --abbrev-commit --pretty=medium` | New alias: `gwch` |
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
### Current
|
### Current
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| :----------------------- | :-------------------------------------------------------------------------------------------------------------- |
|
| :----------------------- | :------------------------------------------------------------------------------------------------------------- |
|
||||||
| `git_current_user_email` | Returns the `user.email` config value. (Lives in `lib/git.zsh`.) |
|
|
||||||
| `git_current_user_name` | Returns the `user.name` config value. (Lives in `lib/git.zsh`.) |
|
|
||||||
| `git_develop_branch` | Returns the name of the “development” branch: `dev`, `devel`, `development` if they exist, `develop` otherwise. |
|
|
||||||
| `git_main_branch` | Returns the name of the main branch: `main` if it exists, `master` otherwise. |
|
|
||||||
| `grename <old> <new>` | Renames branch `<old>` to `<new>`, including on the origin remote. |
|
|
||||||
| `gbda` | Deletes all merged branches |
|
|
||||||
| `gbds` | Deletes all squash-merged branches (**Note: performance degrades with number of branches**) |
|
|
||||||
| `git_current_branch` | Returns the name of the current branch (Lives in `lib/git.zsh`) |
|
| `git_current_branch` | Returns the name of the current branch (Lives in `lib/git.zsh`) |
|
||||||
|
| `git_current_user_email` | Returns the `user.email` config value (Lives in `lib/git.zsh`) |
|
||||||
|
| `git_current_user_name` | Returns the `user.name` config value (Lives in `lib/git.zsh`) |
|
||||||
|
| `git_develop_branch` | Returns the name of the “development” branch: `dev`, `devel`, `development` if they exist, `develop` otherwise |
|
||||||
|
| `git_main_branch` | Returns the name of the main branch: `main` if it exists, `master` otherwise |
|
||||||
|
| `grename <old> <new>` | Renames branch `<old>` to `<new>`, including on the origin remote |
|
||||||
|
| `gbda` | Deletes all merged branches |
|
||||||
|
| `gbds` | Deletes all squash-merged branches (**Note: performance degrades with number of branches**) |
|
||||||
|
|
||||||
### Work in Progress (WIP)
|
### Work in Progress (WIP)
|
||||||
|
|
||||||
|
|
@ -281,4 +278,3 @@ Note that `gwip` and `gunwip` are aliases, but are also documented here to group
|
||||||
|
|
||||||
| Command | Description | Reason |
|
| Command | Description | Reason |
|
||||||
| :------------------- | :-------------------------------------- | :--------------------------------------------------------------- |
|
| :------------------- | :-------------------------------------- | :--------------------------------------------------------------- |
|
||||||
| `current_repository` | Return the names of the current remotes | Didn't work properly. Use `git remote -v` instead (`grv` alias). |
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue