{"id":13457609,"url":"https://github.com/zimfw/git","last_synced_at":"2025-06-15T15:01:46.232Z","repository":{"id":45143493,"uuid":"113081211","full_name":"zimfw/git","owner":"zimfw","description":"Provides nice git aliases and functions.","archived":false,"fork":false,"pushed_at":"2024-06-10T13:30:14.000Z","size":102,"stargazers_count":39,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T12:13:05.865Z","etag":null,"topics":["git","zim","zimfw","zsh","zsh-plugin","zsh-plugins"],"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/zimfw.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":"2017-12-04T18:47:17.000Z","updated_at":"2025-03-29T11:54:29.000Z","dependencies_parsed_at":"2022-07-13T16:50:28.503Z","dependency_job_id":"419b7c17-516d-43ee-bd92-29d83c1c5417","html_url":"https://github.com/zimfw/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/zimfw%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimfw%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimfw%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimfw%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimfw","download_url":"https://codeload.github.com/zimfw/git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710447,"owners_count":21149191,"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","zim","zimfw","zsh","zsh-plugin","zsh-plugins"],"created_at":"2024-07-31T09:00:31.495Z","updated_at":"2025-06-15T15:01:46.224Z","avatar_url":"https://github.com/zimfw.png","language":"Shell","readme":"git\n===\n\nProvides handy Git aliases and functions.\n\nMany thanks to [Sorin Ionescu](https://github.com/sorin-ionescu) for the\nexcellent original aliases.\n\nAliases\n-------\n\n### Git\n\n  * `G` is short for `git`.\n\n### Branch\n\n  * `Gb` lists, creates, renames, and deletes branches.\n  * `Gbc` creates a new branch.\n  * `Gbd` detaches *HEAD* at the tip of the current or given branch.\n  * `Gbl` lists branches and their commits.\n  * `GbL` lists local and remote branches and their commits.\n  * `Gbn` lists branches that do not contain a given commit.\n  * `Gbm` renames a branch.\n  * `GbM` renames a branch even if the new branch name already exists.\n  * `GbR` resets a branch even if the branch name already exists.\n  * `Gbs` lists branches and their commits with ancestry graphs.\n  * `GbS` lists local and remote branches and their commits with ancestry graphs.\n  * `Gbu` unsets the remote-tracking information for the current or given branch.\n  * `GbG` deletes all local branches tracking remote branches that are gone.\n  * `Gbx` deletes a branch.\n  * `GbX` deletes a branch irrespective of its merged status.\n\n### Commit\n\n  * `Gc` records changes to the repository.\n  * `Gca` commits all modified and deleted files.\n  * `GcA` commits all modified and deleted files interactively.\n  * `Gcm` commits with a given message.\n  * `Gco` checks out a branch or paths to the working tree.\n  * `GcO` checks out hunks from the index or the tree interactively.\n  * `Gcf` amends the tip of the current branch reusing the same log message as *HEAD*.\n  * `GcF` amends the tip of the current branch.\n  * `Gcp` applies changes introduced by existing commits.\n  * `GcP` applies changes introduced by existing commits without committing.\n  * `Gcr` reverts existing commits by reverting patches and recording new commits.\n  * `GcR` removes the *HEAD* commit.\n  * `Gcs` shows one or more objects (blobs, trees, tags and commits).\n  * `GcS` commits with GPG signature.\n  * `Gcu` commits with fixup message using given commit.\n  * `GcU` commits with squash message using given commit.\n  * `Gcv` verifies the GPG signature of commits.\n\n### Conflict\n\n  * `GCl` lists unmerged files.\n  * `GCa` adds unmerged file contents to the index.\n  * `GCe` executes merge-tool on all unmerged files.\n  * `GCo` checks out our changes for unmerged paths.\n  * `GCO` checks out our changes for all unmerged paths.\n  * `GCt` checks out their changes for unmerged paths.\n  * `GCT` checks out their changes for all unmerged paths.\n\n### Data\n\n  * `Gd` displays information about files in the index and the working tree.\n  * `Gdc` lists cached files.\n  * `Gdx` lists deleted files.\n  * `Gdm` lists modified files.\n  * `Gdu` lists untracked files.\n  * `Gdk` lists killed files.\n  * `Gdi` lists ignored files.\n  * `GdI` lists commited files that would be ignored.\n\n### Fetch\n\n  * `Gf` downloads objects and references from another repository.\n  * `Gfa` downloads objects and references from all remotes.\n  * `Gfp` prunes stale remote-tracking branches and fetches all remotes.\n  * `Gfc` clones a repository into a new directory.\n  * `Gfm` fetches from and merges with another repository or local branch.\n  * `Gfr` fetches from and rebases on top of another repository or local branch.\n  * `Gfu` prunes stale remote-tracking branches, fetches all remotes and merges.\n\n### Grep\n\n  * `Gg` displays lines matching a pattern.\n  * `Ggi` displays lines matching a pattern ignoring case.\n  * `Ggl` lists files matching a pattern.\n  * `GgL` lists files that are not matching a pattern.\n  * `Ggv` displays lines not matching a pattern.\n  * `Ggw` displays lines matching a pattern at word boundary.\n\n### Help\n\n  * `Gh` displays help information about Git.\n  * `Ghw` displays manual page for the command in the web browser.\n\n### Index\n\n  * `Gia` adds file contents to the index.\n  * `GiA` adds file contents to the index interactively.\n  * `Giu` adds file contents to the index (updates all tracked files).\n  * `GiU` adds file contents to the index (updates all files).\n  * `Gid` displays changes between the index and a named commit (diff).\n  * `GiD` displays changes between the index and a named commit (word diff).\n  * `Gir` resets the current *HEAD* to the specified state.\n  * `GiR` resets the current index interactively.\n  * `Gix` removes files from the index (recursively).\n  * `GiX` removes files from the index (recursively and forced).\n\n### Log\n\n  * `Gl` displays the log.\n  * `Gls` displays the stats log.\n  * `Gld` displays the diff log.\n  * `Glf` displays the diff log of a given file, continuing beyond renames.\n  * `Glo` displays the one line log.\n  * `GlO` displays the one line log with authors and dates.\n  * `Glg` displays the graph log.\n  * `GlG` displays the graph log with authors and dates.\n  * `Glv` displays the log, verifying the GPG signature of commits.\n  * `Glc` displays the commit count for each contributor in descending order.\n  * `Glr` manages reflog information.\n\n### Merge\n\n  * `Gm` joins two or more development histories together.\n  * `Gma` aborts the conflict resolution, and reconstructs the pre-merge state.\n  * `Gmc` continues the merge after conflicts are resolved.\n  * `GmC` performs a merge but does not commit.\n  * `GmF` creates a merge commit even if the merge could be resolved as a fast-forward.\n  * `Gms` performs a squash merge but does not commit.\n  * `GmS` performs a merge and GPG-signs the resulting commit.\n  * `Gmv` verifies the GPG signature of the tip commit of the side branch being merged.\n  * `Gmt` runs the merge conflict resolution tools to resolve conflicts.\n\n### Push\n\n  * `Gp` updates remote refs along with associated objects.\n  * `Gpf` forces a push safely (with \"lease\").\n  * `GpF` forces a push.\n  * `Gpa` pushes all branches.\n  * `GpA` pushes all branches and tags.\n  * `Gpt` pushes all tags.\n  * `Gpc` pushes the current branch and adds *origin* as an upstream reference for it.\n  * `Gpp` pulls and pushes the current branch from *origin* to *origin*.\n\n### Rebase\n\n  * `Gr` forward-ports local commits to the updated upstream head.\n  * `Gra` aborts the rebase, and checks out the original branch.\n  * `Grc` continues the rebase after merge conflicts are resolved.\n  * `Gri` makes a list of commits to be rebased and opens the editor.\n  * `Grs` skips the current patch.\n  * `GrS` rebases and GPG-signs the commits.\n\n### Remote\n\n  * `GR` manages tracked repositories.\n  * `GRl` lists remote names and their URLs.\n  * `GRa` adds a new remote.\n  * `GRx` removes a remote.\n  * `GRm` renames a remote.\n  * `GRu` fetches remotes updates.\n  * `GRp` prunes all stale remote-tracking branches.\n  * `GRs` shows information about a given remote.\n  * `GRS` changes URLs for a remote.\n\n### Stash\n\n  * `Gs` stashes the changes of the dirty working directory.\n  * `Gsa` applies the changes recorded in a stash to the working directory.\n  * `Gsx` drops a stashed state.\n  * `GsX` drops all the stashed states.\n  * `Gsl` lists stashed states.\n  * `Gsd` displays changes between the stash and its original parent.\n  * `Gsp` removes and applies a single stashed state from the stash list.\n  * `Gsr` recovers a given stashed state.\n  * `Gss` stashes the working directory changes, including untracked files.\n  * `GsS` stashes the working directory changes interactively.\n  * `Gsw` stashes the working directory changes retaining the index.\n  * `Gsi` stashes changes in the index retaining the working directory.\n  * `Gsu` undoes (reverses) applied changes.\n\n### Submodule\n\n  * `GS` initializes, updates, or inspects submodules.\n  * `GSa` adds a given repository as a submodule.\n  * `GSf` evaluates a shell command in each of checked out submodules.\n  * `GSi` initializes submodules.\n  * `GSI` initializes and clones submodules recursively.\n  * `GSl` lists the commits of all submodules.\n  * `GSm` moves a submodule.\n  * `GSs` synchronizes remote URL of submodules to the value specified in `.gitmodules`.\n  * `GSu` fetches and merges the latest remote changes for all submodules.\n  * `GSx` removes a submodule.\n\n### Tag\n\n  * `Gt` creates, lists, deletes or verifies a tag object signed with GPG.\n  * `Gtl` lists tags in reverse chronological order (by commit date).\n  * `Gts` creates a GPG-signed tag.\n  * `Gtv` verifies the GPG signature of tags.\n  * `Gtx` deletes tags with given names.\n\n### Main working tree\n\n  * `Gws` displays the working tree status in short format.\n  * `GwS` displays the working tree status.\n  * `Gwd` displays changes between the working tree and the index (diff).\n  * `GwD` displays changes between the working tree and the index (word diff).\n  * `Gwr` resets the current *HEAD* to the specified state, preserving the index and working tree.\n  * `GwR` resets the current *HEAD*, index and working tree to the specified state.\n  * `Gwc` cleans untracked files from the working tree (dry-run).\n  * `GwC` cleans untracked files from the working tree.\n  * `Gwm` moves or renames files.\n  * `GwM` moves or renames files (forced).\n  * `Gwx` removes files from the working tree and from the index (recursively).\n  * `GwX` removes files from the working tree and from the index (recursively and forced).\n\n### Working trees\n\n  * `GW` manages multiple working trees.\n  * `GWa` creates path with a new working tree.\n  * `GWl` lists details of all working trees.\n  * `GWm` moves a working tree to a new location.\n  * `GWp` prunes working tree information.\n  * `GWx` removes a working tree.\n  * `GWX` removes a working tree (forced).\n\n### Switch\n\n  * `Gy` switches branches.\n  * `Gyc` creates a new branch with given name before switching to it.\n  * `Gyd` switches to a commit for inspection and discardable experiments.\n\n### Misc\n\n  * `G..` changes the current directory to the top level of the working tree.\n  * `G?` looks up the aliases defined here with given regular expressions.\n\nSettings\n--------\n\nBy default, all aliases are defined with an upper case `G` prefix, as you can\nsee above. You can use the following zstyle if you wish to customize the prefix\nused to generate all aliases:\n\n    zstyle ':zim:git' aliases-prefix 'g'\n\nAdd the zstyle to your `~/.zshrc` before the module is initialized.\n\nBe careful if changing the prefix to lower case `g`, as the generated aliases\ncan shadow [many](https://github.com/zimfw/git/issues/2) commands, like `gpt`\nfor the GUID partition table maintenance utility.\n\nFunctions\n---------\n\n  * `git-alias-lookup` lists the aliases defined here searching at a given path, by given regular expressions.\n  * `git-branch-current` displays the current branch.\n  * `git-branch-delete-interactive` asks for confirmation to also delete the upstream remote branch(es).\n  * `git-branch-remote-tracking` lists all local branches with none or given remote-tracking status\n     (gone, ahead, behind, or ahead behind).\n  * `git-dir` displays the path to the Git directory.\n  * `git-ignore-add` adds any arguments to the .gitignore in the project root.\n  * `git-root` displays the path to the working tree root.\n  * `git-stash-clear-interactive` asks for confirmation before clearing the stash.\n  * `git-stash-recover` recovers given dropped stashed states.\n  * `git-submodule-move` moves a submodule.\n  * `git-submodule-remove` removes a submodule.\n","funding_links":[],"categories":["Software","Shell"],"sub_categories":["Command line setup"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimfw%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimfw%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimfw%2Fgit/lists"}