{"id":13512400,"url":"https://github.com/jhillyerd/plugin-git","last_synced_at":"2025-10-26T05:13:09.237Z","repository":{"id":37271334,"uuid":"51158923","full_name":"jhillyerd/plugin-git","owner":"jhillyerd","description":"Git aliases plugin for the Fish shell (similar to oh-my-zsh git)","archived":false,"fork":false,"pushed_at":"2025-03-28T15:50:59.000Z","size":128,"stargazers_count":662,"open_issues_count":8,"forks_count":90,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T06:02:00.221Z","etag":null,"topics":["fish","fisher","git","oh-my-fish","omf"],"latest_commit_sha":null,"homepage":"","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/jhillyerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-02-05T16:34:29.000Z","updated_at":"2025-04-10T18:29:28.000Z","dependencies_parsed_at":"2024-11-01T14:31:21.581Z","dependency_job_id":"026e97a2-c8fa-489a-9911-7d73034ffd99","html_url":"https://github.com/jhillyerd/plugin-git","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhillyerd%2Fplugin-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhillyerd%2Fplugin-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhillyerd%2Fplugin-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhillyerd%2Fplugin-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhillyerd","download_url":"https://codeload.github.com/jhillyerd/plugin-git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830397,"owners_count":21168272,"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","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":["fish","fisher","git","oh-my-fish","omf"],"created_at":"2024-08-01T03:01:49.270Z","updated_at":"2025-10-26T05:13:09.116Z","avatar_url":"https://github.com/jhillyerd.png","language":"Shell","readme":"\u003cimg src=\"https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg\" align=\"left\" width=\"144px\" height=\"144px\"/\u003e\n\n#### git\n\u003e A git aliases plugin for [Oh My Fish][omf-link] and [Fisher][fisher-link],\n\u003e based loosely on the [Oh My Zsh Git Plugin][omz-git-plugin].\n\n[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE)\n[![Fish Shell Version](https://img.shields.io/badge/fish-v3.5.0-007EC7.svg?style=flat-square)](https://fishshell.com)\n[![Oh My Fish Framework](https://img.shields.io/badge/Oh%20My%20Fish-Framework-007EC7.svg?style=flat-square)](https://www.github.com/oh-my-fish/oh-my-fish)\n[![Nix Package](https://img.shields.io/badge/nixpkgs-fishPlugins.plugin--git-blue?style=flat-square\u0026logo=nixos)](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/shells/fish/plugins/plugin-git.nix)\n\n\u003cbr/\u003e\n\n## Install\n\noh-my-fish:\n\n```fish\nomf install https://github.com/jhillyerd/plugin-git\n```\n\nfisher:\n```fish\nfisher install jhillyerd/plugin-git\n```\n\nNix's home-manager:\n```nix\n{\n  # ...\n  programs.fish = {\n    enable = true;\n\n    plugins = [\n      {\n        name = \"plugin-git\";\n        src = pkgs.fishPlugins.plugin-git.src;\n      }\n    ];\n  };\n  # ...\n}\n\n```\n\n## Default branch name\n\n`plugin-git` respects `init.defaultBranch` setting that was [introduced in git 2.28](https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch).\nThe order for resolving the default branch name is as follows:\n\n1. `init.defaultBranch` if it is set and the branch exists\n2. `main` if it exists\n3. `master` as fallback\n\n## Sample workflow\n\n```\ncd my-repo       # enter a git repo\ngss              # check current status\n\n.. bunch of old edits I don't want ..\n\ngclean!!         # pristine repo!!\ngcom             # checkout main/master branch\ngl               # pull changes\ngcb fix-bug      # create new fix-bug branch\n\n.. edit files ..\n\ngaa              # add (stage) all changed and new files\ngc               # commit changes\ngpu              # push to origin, set upstream\n\n.. oops, edit more files ..\n\ngcan!            # amend commit w/ all modified files, re-using message\ngp!              # force push changes\n\n.. main branch has some changes I need ..\n\ngrbom            # fetch origin and rebase on main/master\n\n.. editing some files, but need to work on something else quickly ..\n\ngwip             # save WIP commit of working directory for later\ngfa              # fetch all branches from origin\ngloga            # view log graph of all recent repo activity\ngco feature      # switch to existing feature branch\ngwch             # inspect what changed recently (with diffs)\n\n.. edit lots of files ..\n\nga file1 file2   # add just the files I want to commit\n\n.. hmm, will my tests pass with just these two files? ..\n\ngtest make test  # runs 'make test' against staged changes only\n\n.. failed! need to patch in some other changes ..\n\ngapa             # selectively stage more changes\ngtest make test\ngcm \"tests pass\" # commit staged w/ message\ngca              # commit all other modified files\ngp               # push\n\n.. back to my bugfix ..\n\ngco fix-bug      # checkout\ngunwip           # restore work in progress\n```\n\n## Usage\n\n### Bisect\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\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\n### Branch\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gb           | `git branch -vv`                                     |\n| gba          | `git branch -a -v`                                   |\n| gban         | `git branch -a -v --no-merged`                       |\n| gbd          | `git branch -d`                                      |\n| gbD          | `git branch -D`                                      |\n| gbda         | delete all branches merged in current HEAD           |\n| gbage        | list local branches and display their age            |\n| ggsup        | `git branch --set-upstream-to=origin/(__git.current_branch)`  |\n| grename      | rename _old_ branch to _new_, including in origin remote      |\n\n### Checkout\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gco          | `git checkout`                                       |\n| gcod         | `git checkout develop`                               |\n| gcom         | `git checkout (__git.default_branch)`                |\n| gcb          | `git checkout -b`                                    |\n\n### Commit\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\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| gcv          | `git commit -v --no-verify`                          |\n| gcav         | `git commit -a -v --no-verify`                       |\n| gcav!        | `git commit -a -v --no-verify --amend`               |\n| gcm          | `git commit -m`                                      |\n| gcam         | `git commit -a -m`                                   |\n| gcs          | `git commit -S`                                      |\n| gscam        | `git commit -S -a -m`                                |\n| gcfx         | `git commit --fixup`                                 |\n\n### Diff\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gd           | `git diff`                                           |\n| gdca         | `git diff --cached`                                  |\n| gds          | `git diff --stat`                                    |\n| gdsc         | `git diff --stat --cached`                           |\n| gdt          | list changed files                                   |\n| gdw          | `git diff --word-diff`                               |\n| gdwc         | `git diff --word-diff --cached`                      |\n| gdto         | `git difftool`                                       |\n| gdg          | `git diff --no-ext-diff`                             |\n| gdv          | pipe `git diff` to `view` command                    |\n\n### Flow\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gfb          | `git flow bugfix`                                    |\n| gff          | `git flow feature`                                   |\n| gfr          | `git flow release`                                   |\n| gfh          | `git flow hotfix`                                    |\n| gfs          | `git flow support`                                   |\n| gfbs         | `git flow bugfix start`                              |\n| gffs         | `git flow feature start`                             |\n| gfrs         | `git flow release start`                             |\n| gfhs         | `git flow hotfix start`                              |\n| gfss         | `git flow support start`                             |\n| gfbt         | `git flow bugfix track`                              |\n| gfft         | `git flow feature track`                             |\n| gfrt         | `git flow release track`                             |\n| gfht         | `git flow hotfix track`                              |\n| gfst         | `git flow support track`                             |\n| gfp          | `git flow publish`                                   |\n\n### Log\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gcount       | `git shortlog -sn`                                   |\n| glg          | `git log --stat`                                     |\n| glgg         | `git log --graph`                                    |\n| glgga        | `git log --graph --decorate --all`                   |\n| glo          | `git log --oneline --decorate --color`               |\n| gloo         | `git log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short` |\n| glog         | `git log --oneline --decorate --color --graph`       |\n| gloga        | `git log --oneline --decorate --color --graph --all` |\n| glom         | `git log --oneline --decorate --color (__git.default_branch)..` |\n| glod         | `git log --oneline --decorate --color develop..`     |\n| glp          | `git log` at requested pretty level                  |\n| gwch         | `git whatchanged -p --abbrev-commit --pretty=medium` |\n\n### Push \u0026 Pull\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gl           | `git pull`                                           |\n| ggl          | `git pull origin (__git.current_branch)`             |\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| glr          | `git pull --rebase`                                  |\n| gp           | `git push`                                           |\n| gp!          | `git push --force-with-lease`                        |\n| gpo          | `git push origin`                                    |\n| gpo!         | `git push --force-with-lease origin`                 |\n| gpv          | `git push --no-verify`                               |\n| gpv!         | `git push --no-verify --force-with-lease`            |\n| ggp          | `git push origin (__git.current_branch)`             |\n| ggp!         | `git push origin (__git.current_branch) --force-with-lease`   |\n| gpu          | `git push origin (__git.current_branch) --set-upstream`       |\n| gpoat        | `git push origin --all; and git push origin --tags`  |\n| ggpnp        | pull \u0026 push origin _current-branch_                  |\n\n### Rebase\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| grb          | `git rebase`                                         |\n| grba         | `git rebase --abort`                                 |\n| grbc         | `git rebase --continue`                              |\n| grbi         | `git rebase --interactive`                           |\n| grbm         | `git rebase (__git.default_branch)`                            |\n| grbmi        | `git rebase (__git.default_branch) --interactive`              |\n| grbmia       | `git rebase (__git.default_branch) --interactive --autosquash` |\n| grbom        | `git fetch origin (__git.default_branch); and git rebase FETCH_HEAD` |\n| grbomi       | `git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive` |\n| grbomia      | `git fetch origin (__git.default_branch); and git rebase FETCH_HEAD --interactive --autosquash` |\n| grbd         | `git rebase develop`                                 |\n| grbdi        | `git rebase develop --interactive`                   |\n| grbdia       | `git rebase develop --interactive --autosquash`      |\n| grbs         | `git rebase --skip`                                  |\n| ggu          | `git pull --rebase origin \\(__git.current_branch\\)`  |\n\n### Remote\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gr           | `git remote -vv`                                     |\n| gra          | `git remote add`                                     |\n| grmv         | `git remote rename`                                  |\n| grpo         | `git remote prune origin`                            |\n| grrm         | `git remote remove`                                  |\n| grset        | `git remote set-url`                                 |\n| grup         | `git remote update`                                  |\n| grv          | `git remote -v`                                      |\n\n### Stash \u0026 Work in Progress\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gsta         | `git stash`                                          |\n| gstd         | `git stash drop`                                     |\n| gstl         | `git stash list`                                     |\n| gstp         | `git stash pop`                                      |\n| gsts         | `git stash show --text`                              |\n| gtest        | runs specified command against staged files only     |\n| gwip         | commit a work-in-progress branch                     |\n| gunwip       | uncommit the work-in-progress branch                 |\n\n### Tags\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gts          | `git tag -s`                                         |\n| gtv          | `git tag \\| sort -V`                                 |\n| gtl          | list tags matching prefix                            |\n\n\n### Local Files\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| ga           | `git add`                                            |\n| gaa          | `git add --all`                                      |\n| gau          | `git add --update`                                   |\n| gapa         | `git add --patch`                                    |\n| grm          | `git rm`                                             |\n| grmc         | `git rm --cached`                                    |\n| grs          | `git restore`                                        |\n| grss         | `git restore --source`                               |\n| grst         | `git restore --staged`                               |\n\n### Worktree\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gwt          | `git worktree`                                       |\n| gwta         | `git worktree add`                                   |\n| gwtls        | `git worktree list`                                  |\n| gwtlo        | `git worktree lock`                                  |\n| gwtmv        | `git wortree remove`                                 |\n| gwtpr        | `git worktree prune`                                 |\n| gwtulo       | `git worktree unlock`                                |\n\n### GitLab-specific [push options](https://docs.gitlab.com/ee/user/project/push_options.html)\n\n| Abbreviation | Command                                              |\n| ------------ | ---------------------------------------------------- |\n| gmr          | Push current branch and create a merge request from it |\n| gmwps        | Same as `gmr` but set the merge request to merge when the pipeline succeeds |\n\n### Everything Else\n\n| Abbreviation | Command                                                     |\n| ------------ | --------------------------------------------------------    |\n| g            | `git`                                                       |\n| gap          | `git apply`                                                 |\n| gbl          | `git blame -b -w`                                           |\n| gcf          | `git config --list`                                         |\n| gcl          | `git clone`                                                 |\n| gclean       | `git clean -di`                                             |\n| gclean!      | `git clean -dfx`                                            |\n| gclean!!     | `git reset --hard; and git clean -dfx`                      |\n| gcp          | `git cherry-pick`                                           |\n| gcpa         | `git cherry-pick --abort`                                   |\n| gcpc         | `git cherry-pick --continue`                                |\n| gignore      | `git update-index --assume-unchanged`                       |\n| gignored     | list temporarily ignored files                              |\n| gf           | `git fetch`                                                 |\n| gfa          | `git fetch --all --prune`                                   |\n| gfm          | `git fetch origin (__git.default_branch) --prune; and git merge FETCH_HEAD` |\n| gfo          | `git fetch origin`                                          |\n| gm           | `git merge`                                                 |\n| gmt          | `git mergetool --no-prompt`                                 |\n| gmom         | `git merge origin/(__git.default_branch)`                   |\n| grev         | `git revert`                                                |\n| grh          | `git reset HEAD`                                            |\n| grhh         | `git reset HEAD --hard`                                     |\n| grhpa        | `git reset --patch`                                         |\n| grt          | cd into the top of the current repository or submodule      |\n| gsh          | `git show`                                                  |\n| gsd          | `git svn dcommit`                                           |\n| gsr          | `git svn rebase`                                            |\n| gsb          | `git status -sb`                                            |\n| gss          | `git status -s`                                             |\n| gst          | `git status`                                                |\n| gsu          | `git submodule update`                                      |\n| gsur         | `git submodule update --recursive`                          |\n| gsuri        | `git submodule update --recursive --init`                   |\n| gsw          | `git switch`                                                |\n| gswc         | `git switch --create`                                       |\n| gunignore    | `git update-index --no-assume-unchanged`                    |\n\n\n# License\n\n[MIT][mit] © [James Hillyerd][author] et [al][contributors]\n\n\n[mit]:            https://opensource.org/licenses/MIT\n[author]:         https://github.com/jhillyerd\n[contributors]:   https://github.com/jhillyerd/plugin-git/graphs/contributors\n[omf-link]:       https://github.com/oh-my-fish/oh-my-fish\n[fisher-link]:    https://github.com/jorgebucaran/fisher\n\n[license-badge]:  https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square\n[omz-git-plugin]: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git/\n","funding_links":[],"categories":["Shell","Resources"],"sub_categories":["Command-Line Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhillyerd%2Fplugin-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhillyerd%2Fplugin-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhillyerd%2Fplugin-git/lists"}