{"id":18894924,"url":"https://github.com/davidde/git","last_synced_at":"2025-04-15T00:32:18.575Z","repository":{"id":48968746,"uuid":"268287383","full_name":"davidde/git","owner":"davidde","description":"Custom oh-my-zsh git plugin","archived":false,"fork":false,"pushed_at":"2023-03-10T21:39:01.000Z","size":53,"stargazers_count":49,"open_issues_count":2,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T13:06:00.015Z","etag":null,"topics":["git","oh-my-zsh","productivity","shell","terminal","zsh"],"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/davidde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-31T13:36:35.000Z","updated_at":"2025-03-22T14:32:49.000Z","dependencies_parsed_at":"2024-01-07T13:10:08.075Z","dependency_job_id":null,"html_url":"https://github.com/davidde/git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidde%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidde%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidde%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidde%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidde","download_url":"https://codeload.github.com/davidde/git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984501,"owners_count":21193761,"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":["git","oh-my-zsh","productivity","shell","terminal","zsh"],"created_at":"2024-11-08T08:25:34.010Z","updated_at":"2025-04-15T00:32:13.554Z","avatar_url":"https://github.com/davidde.png","language":"Shell","readme":"# oh-my-zsh git plugin\nThis plugin is a complete replacement for the default oh-my-zsh git plugin,\nand provides quite a few useful aliases and functions.\nThe motivation to replace the default plugin stems from the fact\nthat it comes with some inconsistencies that make a few popular commands\nrather unintuitive:\n* `gcm='git checkout master'`: this is inconsistent with `gco='git checkout'`,  \n and on top of that it steals what should be the shortcut for `git commit -m`.\n* Similar issues with `git log`: half of the commands use `glg`, the other half `gl`,  \n  but `gl` by itself is `git pull` (!?), for which `gpl` would make more sense.\n* ...\n\nThe efficiency of these shortcuts is kind of lost when you have to remember\ndifferent letters for the same subcommand depending on the parameter(s)\nyou're using ...\n\nIn this plugin, great care care is taken to make sure all aliases are the most\nintuitive they can possibly be.  \nOn top of that, quite a few extra functions are added.\n\n\n## Installation\nTo use this plugin, clone this repo to `~/.oh-my-zsh/custom/plugins`:\n```\ngit clone https://github.com/davidde/git.git ~/.oh-my-zsh/custom/plugins/git\n```\nThis will automatically override the default git plugin.\n\nIf you aren't yet using the default plugin,\nadd `git` to the plugins in your `~/.zshrc` file:\n```\nplugins=(git)\n```\n\n\n## Aliases cheatsheet\n\n| Alias           | Command                                                   |\n|:----------------|:----------------------------------------------------------|\n| **g**           | git                                                       |\n| **ga**          | git add                                                   |\n| **gaa**         | git add --all                                             |\n| **gai**         | git add --interactive                                     |\n| **galias**      | git_list_aliases                                          |\n| **gam**         | **g**it commit --**a**mend -**m**                         |\n| **gama**        | **g**it commit --**a**mend -**m** --**a**ll               |\n| **gan**         | **g**it commit --**a**mend --**n**o-edit                  |\n| **gana**        | **g**it commit --**a**mend --**n**o-edit --**a**ll        |\n| **gap**         | git add --patch                                           |\n| **gb**          | git branch                                                |\n| **gba**         | git branch --all                                          |\n| **gbd**         | git branch --delete                                       |\n| **gbdf**        | git branch --delete --force                               |\n| **gbl**         | git blame                                                 |\n| **gbll**        | git_blame_line *\\\u003cfile\u003e [\\\u003cfrom line\u003e] [\\\u003cto line\u003e]*      |\n| **gbls**        | git branch --list \\| cat                                  |\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 --verbose                                      |\n| **gcam**        | git commit -am                                            |\n| **gcame**       | git commit -am --allow-empty-message \"\"                   |\n| **gcamg**       | git commit -am --gpg-sign                                 |\n| **gcams**       | git commit -am --signoff                                  |\n| **gcem**        | git commit --allow-empty -m                               |\n| **gcf**         | git config                                                |\n| **gcfl**        | git config --list                                         |\n| **gcfls**       | git config --list \\| cat                                  |\n| **gcl**         | git clone --recurse-submodules                            |\n| **gclcd**       | git_clone_and_cd                                          |\n| **gcm**         | git commit -m                                             |\n| **gcmg**        | git commit -m --gpg-sign                                  |\n| **gcms**        | git commit -m --signoff                                   |\n| **gcnt**        | git_count                                                 |\n| **gcnta**       | git_count_all                                             |\n| **gco**         | git checkout                                              |\n| **gcob**        | git checkout -b                                           |\n| **gcobb**       | \"checkout branch before\": git checkout -                  |\n| **gcoc**        | git_checkout_child                                        |\n| **gcod**        | git checkout develop                                      |\n| **gcom**        | git checkout $(git_main_branch)                           |\n| **gcop**        | git_checkout_parent                                       |\n| **gcp**         | git cherry-pick                                           |\n| **gcpa**        | git cherry-pick --abort                                   |\n| **gcpc**        | git cherry-pick --continue                                |\n| **gd**          | git diff                                                  |\n| **gds**         | git diff --staged                                         |\n| **gdst**        | git diff stash@{0}                                        |\n| **gdsth**       | git diff stash@{0} HEAD                                   |\n| **gdstp**       | git diff stash@{0}^ stash@{0}                             |\n| **gf**          | git fetch                                                 |\n| **gfo**         | git fetch origin                                          |\n| **ggb**         | \"git graph branches\"                                      |\n| **gignore**     | git update-index --skip-worktree                          |\n| **gunignore**   | git update-index --no-skip-worktree                       |\n| **gignored**    | git ls-files -v \\| grep ^S                                |\n| **gl**          | git log --name-status                                     |\n| **glf**         | git_log_file *\\\u003cfile\u003e [\\\u003cfrom line\u003e] [\\\u003cto line\u003e]*        |\n| **glg**         | git log --graph                                           |\n| **glgo**        | git log --graph --oneline                                 |\n| **glgs**        | git log --graph --stat                                    |\n| **glo**         | git log --oneline                                         |\n| **gloc**        | git_locate_string *\\\u003cLine-of-Code\u003e [\\\u003cfile\u003e]*             |\n| **glog**        | git log                                                   |\n| **glr**         | git log --reverse --name-status                           |\n| **gls**         | git ls-files                                              |\n| **gm**          | git merge                                                 |\n| **gmom**        | git merge origin/$(git_main_branch)                       |\n| **gmum**        | git merge upstream/$(git_main_branch)                     |\n| **gmv**         | git mv                                                    |\n| **gp**          | git push                                                  |\n| **gpd**         | git push --delete                                         |\n| **gpdo**        | git push --delete origin                                  |\n| **gpf**         | git push --force-with-lease                               |\n| **gpt**         | git push \u0026\u0026 git push --tags                               |\n| **gpl**         | git pull                                                  |\n| **gplr**        | git pull --rebase                                         |\n| **gplrs**       | git pull --recurse-submodules                             |\n| **gr**          | git reset                                                 |\n| **grhard**      | git reset --hard                                          |\n| **grk**         | git reset --keep                                          |\n| **grs**         | git reset --soft                                          |\n| **grh**         | git_reset_head                                            |\n| **grhhard**     | git_reset_head --hard                                     |\n| **grhk**        | git_reset_head --keep                                     |\n| **grhs**        | git_reset_head --soft                                     |\n| **grb**         | git rebase                                                |\n| **grbm**        | git rebase $(git_main_branch)                             |\n| **grem**        | git remote                                                |\n| **grema**       | git remote add                                            |\n| **gremrm**      | git remote rm                                             |\n| **gremset**     | git remote set-url                                        |\n| **gremsh**      | git remote show                                           |\n| **gremv**       | git remote -v                                             |\n| **grl**         | git reflog                                                |\n| **grm**         | git rm                                                    |\n| **gs**          | git status                                                |\n| **gsh**         | git show                                                  |\n| **gshsf**       | git_show_stash_file *\\\u003cfile\u003e [\\\u003cstash number\u003e]*           |\n| **gss**         | git_status_short                                          |\n| **gst**         | git stash                                                 |\n| **gsta**        | git stash apply                                           |\n| **gstd**        | git stash drop                                            |\n| **gstl**        | git stash list                                            |\n| **gstls**       | git stash list \\| cat                                     |\n| **gstp**        | git stash push                                            |\n| **gstpop**      | git stash pop                                             |\n| **gstsl**       | git stash show -l                                         |\n| **gstsp**       | git stash show -p                                         |\n| **gsub**        | git submodule                                             |\n| **gsuba**       | git submodule add                                         |\n| **gsubi**       | git submodule update --init                               |\n| **gsubpl**      | git submodule foreach git pull                            |\n| **gsubplom**    | git submodule foreach git pull origin $(git_main_branch)  |\n| **gsubs**       | git submodule status                                      |\n| **gsubu**       | git submodule update --remote --merge                     |\n| **gt**          | git tag                                                   |\n| **gtam**        | git tag -am                                               |\n| **gtsm**        | git tag -sm                                               |\n| **gtd**         | git tag --delete                                          |\n| **gtl**         | git tag --list                                            |\n| **gtls**        | git tag --list \\| cat                                     |\n| **gwch**        | git whatchanged -p                                        |\n\u0026nbsp;\n\n\n-------------------------------------------------------------------------------\n\u003e :warning: **Note:**  \n\u003e \n\u003e This cheatsheet is optimized for memorability,\n\u003e and may not correspond literally with the actual aliases. E.g.:\n\u003e   - \"git graph branches\"\n\u003e   - `git log` commands are actually more verbose for nicer output.\n\u003e   - `git commit -m --gpg-sign` has its flags switched because `-m` needs to be last.\n\u003e   - Etc.\n\u003e \n\u003e Check out all commands with usage and clarifications in your local\n\u003e [git.plugin.zsh](./git.plugin.zsh) or the\n\u003e [repo's source code](https://github.com/davidde/git/blob/master/git.plugin.zsh).  \n\u003e \n\u003e Alternatively, run `alias` to see *all* alias implementations,\n\u003e or `galias` for this cheatsheet.  \n\u003e If you want to see any specific implementation, simply run `which \u003calias/function\u003e`.\n-------------------------------------------------------------------------------\n","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidde%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidde%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidde%2Fgit/lists"}