{"id":21396779,"url":"https://github.com/favware/zsh-git-enhanced","last_synced_at":"2025-08-01T19:31:48.778Z","repository":{"id":39858672,"uuid":"236959791","full_name":"favware/zsh-git-enhanced","owner":"favware","description":"Enhanced Git aliases for oh-my-zsh","archived":false,"fork":false,"pushed_at":"2025-01-23T09:21:58.000Z","size":72,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-13T19:40:49.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/favware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["favware","favna"],"patreon":"favna","open_collective":null,"ko_fi":"favna","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=XMAYCF9SDHZ34"}},"created_at":"2020-01-29T10:46:02.000Z","updated_at":"2025-01-23T09:22:02.000Z","dependencies_parsed_at":"2024-03-29T15:23:28.278Z","dependency_job_id":"18a6a1aa-2695-4e11-94fb-978cb5769e5c","html_url":"https://github.com/favware/zsh-git-enhanced","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/favware/zsh-git-enhanced","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favware%2Fzsh-git-enhanced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favware%2Fzsh-git-enhanced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favware%2Fzsh-git-enhanced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favware%2Fzsh-git-enhanced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/favware","download_url":"https://codeload.github.com/favware/zsh-git-enhanced/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/favware%2Fzsh-git-enhanced/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268285749,"owners_count":24225784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T14:29:15.951Z","updated_at":"2025-08-01T19:31:48.718Z","avatar_url":"https://github.com/favware.png","language":"Shell","funding_links":["https://github.com/sponsors/favware","https://github.com/sponsors/favna","https://patreon.com/favna","https://ko-fi.com/favna","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=XMAYCF9SDHZ34"],"categories":[],"sub_categories":[],"readme":"# zsh-git-enhanced\n\n## Installation\n\nThe easiest way to install this plugin is to use [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh).\n\n1. First clone the plugin repository into your custom plugins directory, for example:\n\n   ```zsh\n   git clone https://github.com/favware/zsh-git-enhanced.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-git-enhanced\n   ```\n\n2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`):\n\n   ```zsh\n   plugins=(zsh-git-enhanced)\n   ```\n\n3. If you previously had the base `git` plugin be sure to remove it from the plugins list!\n\n4. Start a new terminal session.\n\nThe git plugin provides many [aliases](#aliases) and a few useful [functions](#functions).\n\n## Aliases\n\n| Alias                | Command                                                                                                                 |\n| :------------------- | :---------------------------------------------------------------------------------------------------------------------- |\n| g                    | `git                                                                                                                     `|\n| ga                   | `git add                                                                                                                 `|\n| gaa                  | `git add --all                                                                                                           `|\n| gapa                 | `git add --patch                                                                                                         `|\n| gau                  | `git add --update                                                                                                        `|\n| gav                  | `git add --verbose                                                                                                       `|\n| gap                  | `git apply                                                                                                               `|\n| gb                   | `git branch                                                                                                              `|\n| gba                  | `git branch -a                                                                                                           `|\n| gbd                  | `git branch -d                                                                                                           `|\n| gbda                 | `git branch --no-color --merged \\| command grep -vE \"^(\\+\\|\\*\\|\\s*(master\\|develop\\|dev)\\s*$)\" \\| command xargs -n 1 git branch -d `|\n| gbD                  | `git branch -D                                                                                                           `|\n| gbl                  | `git blame -b -w                                                                                                         `|\n| gbnm                 | `git branch --no-merged                                                                                                  `|\n| gbr                  | `git branch --remote                                                                                                     `|\n| gbs                  | `git bisect                                                                                                              `|\n| gbsb                 | `git bisect bad                                                                                                          `|\n| gbsg                 | `git bisect good                                                                                                         `|\n| gbsr                 | `git bisect reset                                                                                                        `|\n| gbss                 | `git bisect start                                                                                                        `|\n| gc                   | `git commit -v                                                                                                           `|\n| gc!                  | `git commit -v --amend                                                                                                   `|\n| gcn!                 | `git commit -v --no-edit --amend                                                                                         `|\n| gca                  | `git commit -v -a                                                                                                        `|\n| gca!                 | `git commit -v -a --amend                                                                                                `|\n| gcan!                | `git commit -v -a --no-edit --amend                                                                                      `|\n| gcans!               | `git commit -v -a -s --no-edit --amend                                                                                   `|\n| gcam                 | `git commit -a -m                                                                                                        `|\n| gcsm                 | `git commit -s -m                                                                                                        `|\n| gcb                  | `git checkout -b                                                                                                         `|\n| gcf                  | `git config --list                                                                                                       `|\n| gcl                  | `git clone --recurse-submodules                                                                                          `|\n| gclean               | `git clean -id                                                                                                           `|\n| gpristine            | `git reset --hard \u0026\u0026 git clean -dfx                                                                                      `|\n| gcm                  | `git checkout master                                                                                                     `|\n| gcd                  | `git checkout develop                                                                                                    `|\n| gcmsg                | `git commit -m                                                                                                           `|\n| gco                  | `git checkout                                                                                                            `|\n| gcount               | `git shortlog -sn                                                                                                        `|\n| gcp                  | `git cherry-pick                                                                                                         `|\n| gcpa                 | `git cherry-pick --abort                                                                                                 `|\n| gcpc                 | `git cherry-pick --continue                                                                                              `|\n| gcs                  | `git commit -S                                                                                                           `|\n| gd                   | `git diff                                                                                                                `|\n| gdca                 | `git diff --cached                                                                                                       `|\n| gdcw                 | `git diff --cached --word-diff                                                                                           `|\n| gdct                 | `git describe --tags \\$(git rev-list --tags --max-count=1)                                                               `|\n| gds                  | `git diff --staged                                                                                                       `|\n| gdt                  | `git diff-tree --no-commit-id --name-only -r                                                                             `|\n| gdv                  | `git diff -w \\$@ \\| view -                                                                                               `|\n| gdw                  | `git diff --word-diff                                                                                                    `|\n| gf                   | `git fetch                                                                                                               `|\n| gfa                  | `git fetch --all --prune                                                                                                 `|\n| gfg                  | `git ls-files \\| grep                                                                                                    `|\n| gfo                  | `git fetch origin                                                                                                        `|\n| gg                   | `git gui citool                                                                                                          `|\n| gga                  | `git gui citool --amend                                                                                                  `|\n| ggf                  | `git push --force origin \\$(current_branch)                                                                              `|\n| ggfl                 | `git push --force-with-lease origin \\$(current_branch)                                                                   `|\n| ggl                  | `git pull origin \\$(current_branch)                                                                                      `|\n| ggp                  | `git push origin \\$(current_branch)                                                                                      `|\n| ggpnp                | `ggl \u0026\u0026 ggp                                                                                                              `|\n| ggpull               | `git pull origin \"\\$(git_current_branch)\"                                                                                `|\n| ggpur                | `ggu                                                                                                                     `|\n| ggpush               | `git push origin \"\\$(git_current_branch)\"                                                                                `|\n| ggsup                | `git branch --set-upstream-to=origin/\\$(git_current_branch)                                                              `|\n| ggu                  | `git pull --rebase origin \\$(current_branch)                                                                             `|\n| gpsup                | `git push --set-upstream origin \\$(git_current_branch)                                                                   `|\n| ghh                  | `git help                                                                                                                `|\n| gignore              | `git update-index --assume-unchanged                                                                                     `|\n| gignored             | `git ls-files -v \\| grep \"^[[:lower:]]\"                                                                                  `|\n| gk                   | `gitk --all --branches                                                                                                   `|\n| gke                  | `gitk --all \\$(git log -g --pretty=%h)                                                                                   `|\n| gl                   | `git pull                                                                                                                `|\n| glg                  | `git log --stat                                                                                                          `|\n| glgp                 | `git log --stat -p                                                                                                       `|\n| glgg                 | `git log --graph                                                                                                         `|\n| glgga                | `git log --graph --decorate --all                                                                                        `|\n| glgm                 | `git log --graph --max-count=10                                                                                          `|\n| glo                  | `git log --oneline --decorate                                                                                            `|\n| glol                 | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset'                  `|\n| glols                | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset' --stat           `|\n| glod                 | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)\u003c%an\u003e%Creset'                  `|\n| glods                | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)\u003c%an\u003e%Creset' --date=short     `|\n| glola                | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset' --all            `|\n| glog                 | `git log --oneline --decorate --graph                                                                                    `|\n| gloga                | `git log --oneline --decorate --graph --all                                                                              `|\n| glp                  | `_git_log_prettily`                                                                                                     |\n| gm                   | `git merge                                                                                                               `|\n| gmom                 | `git merge origin/master                                                                                                 `|\n| gmt                  | `git mergetool --no-prompt                                                                                               `|\n| gmtvim               | `git mergetool --no-prompt --tool=vimdiff                                                                                `|\n| gmum                 | `git merge upstream/master                                                                                               `|\n| gma                  | `git merge --abort                                                                                                       `|\n| gp                   | `git push                                                                                                                `|\n| gpd                  | `git push --dry-run                                                                                                      `|\n| gpf                  | `git push --force-with-lease                                                                                             `|\n| gpf!                 | `git push --force                                                                                                        `|\n| gpoat                | `git push origin --all \u0026\u0026 git push origin --tags                                                                         `|\n| gpu                  | `git push upstream                                                                                                       `|\n| gpv                  | `git push -v                                                                                                             `|\n| gr                   | `git remote                                                                                                              `|\n| gra                  | `git remote add                                                                                                          `|\n| grau                 | `git remote add upstream                                                                                                 `|\n| grad                 | `git remote add downstream                                                                                               `|\n| grb                  | `git rebase                                                                                                              `|\n| grba                 | `git rebase --abort                                                                                                      `|\n| grbc                 | `git rebase --continue                                                                                                   `|\n| grbd                 | `git rebase develop                                                                                                      `|\n| grbi                 | `git rebase -i                                                                                                           `|\n| grbm                 | `git rebase $(git_main_branch)                                                                                           `|\n| grbom                | `git rebase origin/$(git_main_branch)                                                                                    `|\n| grbum                | `git rebase upstream/$(git_main_branch)                                                                                  `|\n| grbs                 | `git rebase --skip                                                                                                       `|\n| grev                 | `git revert                                                                                                              `|\n| grh                  | `git reset                                                                                                               `|\n| grhh                 | `git reset --hard                                                                                                        `|\n| groh                 | `git reset origin/\\$(git_current_branch) --hard                                                                          `|\n| grm                  | `git rm                                                                                                                  `|\n| grmc                 | `git rm --cached                                                                                                         `|\n| grmv                 | `git remote rename                                                                                                       `|\n| grrm                 | `git remote remove                                                                                                       `|\n| grs                  | `git restore                                                                                                             `|\n| grset                | `git remote set-url                                                                                                      `|\n| grss                 | `git restore --source                                                                                                    `|\n| grt                  | `cd \"\\$(git rev-parse --show-toplevel \\|\\| echo .)\"                                                                      `|\n| gru                  | `git reset --                                                                                                            `|\n| grup                 | `git remote update                                                                                                       `|\n| grv                  | `git remote -v                                                                                                           `|\n| gsb                  | `git status -sb                                                                                                          `|\n| gsd                  | `git rebase -i HEAD~$(git rev-list --count origin/$(git_main_branch)..$(git rev-parse --abbrev-ref HEAD))                `|\n| gsh                  | `git show                                                                                                                `|\n| gsi                  | `git submodule init                                                                                                      `|\n| gsps                 | `git show --pretty=short --show-signature                                                                                `|\n| gss                  | `git status -s                                                                                                           `|\n| gst                  | `git status                                                                                                              `|\n| gsta                 | `git stash push                                                                                                          `|\n| gsta                 | `git stash save                                                                                                          `|\n| gstaa                | `git stash apply                                                                                                         `|\n| gstc                 | `git stash clear                                                                                                         `|\n| gstd                 | `git stash drop                                                                                                          `|\n| gstl                 | `git stash list                                                                                                          `|\n| gstr                 | `interactive renaming of an existing stash                                                                               `|\n| gstp                 | `git stash pop                                                                                                           `|\n| gsts                 | `git stash show --text                                                                                                   `|\n| gstall               | `git stash --all                                                                                                         `|\n| gsu                  | `git submodule update                                                                                                    `|\n| gsw                  | `git switch                                                                                                              `|\n| gswc                 | `git switch -c                                                                                                           `|\n| gts                  | `git tag -s                                                                                                              `|\n| gtv                  | `git tag \\| sort -V                                                                                                      `|\n| gtl                  | `gtl(){ git tag --sort=-v:refname -n -l \\${1}\\* }; noglob gtl                                                            `|\n| gunignore            | `git update-index --no-assume-unchanged                                                                                  `|\n| gunwip               | `git log -n 1 \\| grep -q -c \"\\-\\-wip\\-\\-\" \u0026\u0026 git reset HEAD~1                                                            `|\n| gup                  | `git pull --rebase                                                                                                       `|\n| gupv                 | `git pull --rebase -v                                                                                                    `|\n| gupa                 | `git pull --rebase --autostash                                                                                           `|\n| gupav                | `git pull --rebase --autostash -v                                                                                        `|\n| glum                 | `git pull upstream master                                                                                                `|\n| gwch                 | `git whatchanged -p --abbrev-commit --pretty=medium                                                                      `|\n| gwip                 | `git add -A; git rm \\$(git ls-files --deleted) 2\u003e /dev/null; git commit --no-verify --no-gpg-sign -m \"--wip-- [skip ci]\" `|\n| grlm                 | `git rev-list --count master..\\$(git_current_branch)                                                                     `|\n| grlmo                | `git rev-list --count origin/master..\\$(git_current_branch)                                                              `|\n\n### [`Git-Duet`] specific tags\n\n| Alias | Command                                           |\n| :---- | :------------------------------------------------ |\n| gdc   | `git duet-commit -vs                               `|\n| gdci  | `git duet-commit -vs                               `|\n| gdr   | `git duet-revert -v                                `|\n| gdrv  | `git duet-revert -v                                `|\n| gdm   | `git duet-merge -v                                 `|\n| gdmg  | `git duet-merge -v                                 `|\n| gfix  | `git duet-commit -s --amend --reset-author -C HEAD `|\n\n### Deprecated\n\nThese are aliases that have been removed, renamed, or otherwise modified in a way that may, or may not, receive further support.\n\n| Alias  | Command                                              | Modification                                           |\n| :----- | :--------------------------------------------------- | ------------------------------------------------------ |\n| gap    | `git add --patch                                     ` | new alias `gapa`                                       |\n| gcl    | `git config --list                                   ` | new alias `gcf`                                        |\n| gdc    | `git diff --cached                                   ` | new alias `gdca`                                       |\n| gdt    | `git difftool                                        ` | no replacement                                         |\n| ggpull | `git pull origin \\$(current_branch)                  ` | new alias `ggl` (`ggpull` still exists for now though) |\n| ggpur  | `git pull --rebase origin \\$(current_branch)         ` | new alias `ggu` (`ggpur` still exists for now though)  |\n| ggpush | `git push origin \\$(current_branch)                  ` | new alias `ggp` (`ggpush` still exists for now though) |\n| gk     | `gitk --all --branches                               ` | now aliased to `gitk --all --branches`                 |\n| glg    | `git log --stat --max-count = 10                     ` | now aliased to `git log --stat --color`                |\n| glgg   | `git log --graph --max-count = 10                    ` | now aliased to `git log --graph --color`               |\n| gwc    | `git whatchanged -p --abbrev-commit --pretty = medium` | new alias `gwch`                                       |\n\n## Functions\n\n### Current\n\n| Command                | Description                           |\n| :--------------------- | :------------------------------------ |\n| current_branch         | Return the name of the current branch |\n| git_current_user_name  | Returns the `user.name` config value  |\n| git_current_user_email | Returns the `user.email` config value |\n\n### Work in Progress (WIP)\n\nThese features allow to pause a branch development and switch to another one (_\"Work in Progress\"_, or wip). When you want to go back to work, just unwip it.\n\n| Command          | Description                                     |\n| :--------------- | :---------------------------------------------- |\n| work_in_progress | Echoes a warning if the current branch is a wip |\n| gwip             | Commit wip branch                               |\n| gunwip           | Uncommit wip branch                             |\n\n### Deprecated\n\n| Command            | Description                             | Reason                                                          |\n| :----------------- | :-------------------------------------- | :-------------------------------------------------------------- |\n| current_repository | Return the names of the current remotes | Didn't work properly. Use `git remote -v` instead (`grv` alias) |\n\n[`git-duet`]: https://github.com/git-duet/git-duet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavware%2Fzsh-git-enhanced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffavware%2Fzsh-git-enhanced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavware%2Fzsh-git-enhanced/lists"}