All Projects → zimfw → git

zimfw / git

Licence: MIT license
Provides nice git aliases and functions.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to git

Zsh Nvm
Zsh plugin for installing, updating and loading nvm
Stars: ✭ 1,670 (+6323.08%)
Mutual labels:  zsh-plugin, zsh-plugins, zim
Awesome Zsh Plugins
A collection of ZSH frameworks, plugins, themes and tutorials.
Stars: ✭ 10,129 (+38857.69%)
Mutual labels:  zsh-plugin, zsh-plugins
zsh-poetry
🐚 Simple ZSH plugin for automatically activating and deactivating Poetry-created virtualenvs. 🐍
Stars: ✭ 43 (+65.38%)
Mutual labels:  zsh-plugin, zsh-plugins
tumult.plugin.zsh
Tumult is a collection of macOS-specific functions and scripts for your shell environment. It is packaged as a ZSH plugin, but can be used with other shells as well.
Stars: ✭ 147 (+465.38%)
Mutual labels:  zsh-plugin, zsh-plugins
Zimfw
Zim: Modular, customizable, and blazing fast Zsh framework
Stars: ✭ 2,219 (+8434.62%)
Mutual labels:  zim, zimfw
crash
Proper error handling, exceptions and try/catch for ZSH
Stars: ✭ 51 (+96.15%)
Mutual labels:  zsh-plugin, zsh-plugins
aterminal
🎉 An oh-my-zsh plugin for show platform versions
Stars: ✭ 31 (+19.23%)
Mutual labels:  zsh-plugin, zsh-plugins
tipz
Gives you helpful hints when you execute a command for which you have an alias defined
Stars: ✭ 24 (-7.69%)
Mutual labels:  zsh-plugin, zsh-plugins
dotfiles
⚫️ ~ is where the ♥ is - my dotfiles.
Stars: ✭ 94 (+261.54%)
Mutual labels:  zsh-plugin, zsh-plugins
Forgit
💤 A utility tool powered by fzf for using git interactively.
Stars: ✭ 1,823 (+6911.54%)
Mutual labels:  zsh-plugin
Zsh Vi Mode
💻 A better and friendly vi(vim) mode plugin for ZSH.
Stars: ✭ 181 (+596.15%)
Mutual labels:  zsh-plugin
Zui
⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (+265.38%)
Mutual labels:  zsh-plugin
Zsh Navigation Tools
Curses-based tools for Zsh, e.g. multi-word history searcher
Stars: ✭ 249 (+857.69%)
Mutual labels:  zsh-plugin
Zsh Snap
⚡️ Znap! A fast & light-weight plugin manager & Git repo manager for Zsh.
Stars: ✭ 98 (+276.92%)
Mutual labels:  zsh-plugin
Zsh Abbrev Alias
This zsh plugin provides functionality similar to Vim's abbreviation expansion.
Stars: ✭ 84 (+223.08%)
Mutual labels:  zsh-plugin
zsh-ec2ssh
zsh plugin to list up EC2 instances and ssh login the instances.
Stars: ✭ 10 (-61.54%)
Mutual labels:  zsh-plugins
zsh-fast-alias-tips
Help remembering the aliases you defined once
Stars: ✭ 58 (+123.08%)
Mutual labels:  zsh-plugin
Quiver
Quiver is the tool to manage all of your tools for bug bounty hunting and penetration testing.
Stars: ✭ 140 (+438.46%)
Mutual labels:  zsh-plugin
History Sync
An oh-my-zsh plugin for GPG encrypted internet synchronised Zsh history, with Git.
Stars: ✭ 135 (+419.23%)
Mutual labels:  zsh-plugin
zim-plugin-instantsearch
Search as you type in Zim, in similar manner to OneNote Ctrl+E.
Stars: ✭ 32 (+23.08%)
Mutual labels:  zim

git

Provides handy git aliases and functions.

Many thanks to Sorin Ionescu for the excellent original aliases.

Aliases

Git

  • G is short for git.

Branch

  • Gb lists, creates, renames, and deletes branches.
  • Gbc creates a new branch.
  • Gbd detaches HEAD at the tip of the current or given branch.
  • Gbl lists branches and their commits.
  • GbL lists local and remote branches and their commits.
  • Gbm renames a branch.
  • GbM renames a branch even if the new branch name already exists.
  • GbR resets a branch even if the branch name already exists.
  • Gbs lists branches and their commits with ancestry graphs.
  • GbS lists local and remote branches and their commits with ancestry graphs.
  • Gbu unsets the remote-tracking information for the current or given branch.
  • GbG deletes all local branches tracking remote branches that are gone.
  • Gbx deletes a branch.
  • GbX deletes a branch irrespective of its merged status.

Commit

  • Gc records changes to the repository.
  • Gca commits all modified and deleted files.
  • GcA commits all modified and deleted files interactively.
  • Gcm commits with the given message.
  • Gco checks out a branch or paths to the working tree.
  • GcO checks out hunks from the index or the tree interactively.
  • Gcf amends the tip of the current branch reusing the same log message as HEAD.
  • GcF amends the tip of the current branch.
  • Gcp applies changes introduced by existing commits.
  • GcP applies changes introduced by existing commits without committing.
  • Gcr reverts existing commits by reverting patches and recording new commits.
  • GcR removes the HEAD commit.
  • Gcs shows one or more objects (blobs, trees, tags and commits).
  • GcS commits with GPG signature.
  • Gcu commits with fixup message using given commit.
  • GcU commits with squash message using given commit.
  • Gcv verifies the GPG signature of commits.

Conflict

  • GCl lists unmerged files.
  • GCa adds unmerged file contents to the index.
  • GCe executes merge-tool on all unmerged files.
  • GCo checks out our changes for unmerged paths.
  • GCO checks out our changes for all unmerged paths.
  • GCt checks out their changes for unmerged paths.
  • GCT checks out their changes for all unmerged paths.

Data

  • Gd displays information about files in the index and the work tree.
  • Gdc lists cached files.
  • Gdx lists deleted files.
  • Gdm lists modified files.
  • Gdu lists untracked files.
  • Gdk lists killed files.
  • Gdi lists ignored files.

Fetch

  • Gf downloads objects and references from another repository.
  • Gfa downloads objects and references from all remotes.
  • Gfp prunes stale remote-tracking branches and fetches all remotes.
  • Gfc clones a repository into a new directory.
  • Gfm fetches from and merges with another repository or local branch.
  • Gfr fetches from and rebases on top of another repository or local branch.
  • Gfu prunes stale remote-tracking branches, fetches all remotes and merges.

Grep

  • Gg displays lines matching a pattern.
  • Ggi displays lines matching a pattern ignoring case.
  • Ggl lists files matching a pattern.
  • GgL lists files that are not matching a pattern.
  • Ggv displays lines not matching a pattern.
  • Ggw displays lines matching a pattern at word boundary.

Index

  • Gia adds file contents to the index.
  • GiA adds file contents to the index interactively.
  • Giu adds file contents to the index (updates only known files).
  • Gid displays changes between the index and a named commit (diff).
  • GiD displays changes between the index and a named commit (word diff).
  • Gir resets the current HEAD to the specified state.
  • GiR resets the current index interactively.
  • Gix removes files from the index (recursively).
  • GiX removes files from the index (recursively and forced).

Log

  • Gl displays the log.
  • Gls displays the stats log.
  • Gld displays the diff log.
  • Glf displays the diff log of a given file, continuing beyond renames.
  • Glo displays the one line log.
  • GlO displays the one line log with authors and dates.
  • Glg displays the graph log.
  • GlG displays the graph log with authors and dates.
  • Glv displays the log, verifying the GPG signature of commits.
  • Glc displays the commit count for each contributor in descending order.
  • Glr manages reflog information.

Merge

  • Gm joins two or more development histories together.
  • Gma aborts the conflict resolution, and reconstructs the pre-merge state.
  • Gmc continues the merge after conflicts are resolved.
  • GmC performs the merge but does not commit.
  • GmF creates a merge commit even if the merge could be resolved as a fast-forward.
  • GmS performs the merge and GPG-signs the resulting commit.
  • Gmv verifies the GPG signature of the tip commit of the side branch being merged.
  • Gmt runs the merge conflict resolution tools to resolve conflicts.

Push

  • Gp updates remote refs along with associated objects.
  • Gpf forces a push safely (with "lease").
  • GpF forces a push.
  • Gpa pushes all branches.
  • GpA pushes all branches and tags.
  • Gpt pushes all tags.
  • Gpc pushes the current branch and adds origin as an upstream reference for it.
  • Gpp pulls and pushes the current branch from origin to origin.

Rebase

  • Gr forward-ports local commits to the updated upstream head.
  • Gra aborts the rebase, and checks out the original branch.
  • Grc continues the rebase after merge conflicts are resolved.
  • Gri makes a list of commits to be rebased and opens the editor.
  • Grs skips the current patch.
  • GrS rebases and GPG-signs the commits.

Remote

  • GR manages tracked repositories.
  • GRl lists remote names and their URLs.
  • GRa adds a new remote.
  • GRx removes a remote.
  • GRm renames a remote.
  • GRu fetches remotes updates.
  • GRp prunes all stale remote-tracking branches.
  • GRs shows information about a given remote.
  • GRS changes URLs for a remote.

Stash

  • Gs stashes the changes of the dirty working directory.
  • Gsa applies the changes recorded in a stash to the working directory.
  • Gsx drops a stashed state.
  • GsX drops all the stashed states.
  • Gsl lists stashed states.
  • Gsd displays changes between the stash and its original parent.
  • Gsp removes and applies a single stashed state from the stash list.
  • Gsr recovers a given stashed state.
  • Gss stashes the working directory changes, including untracked files.
  • GsS stashes the working directory changes interactively.
  • Gsw stashes the working directory changes retaining the index.
  • Gsu unapplies (reverts) applied changes.

Submodule

  • GS initializes, updates, or inspects submodules.
  • GSa adds given a repository as a submodule.
  • GSf evaluates a shell command in each of checked out submodules.
  • GSi initializes submodules.
  • GSI initializes and clones submodules recursively.
  • GSl lists the commits of all submodules.
  • GSm moves a submodule.
  • GSs synchronizes remote URL of submodules to the value specified in .gitmodules.
  • GSu fetches and merges the latest remote changes for all submodules.
  • GSx removes a submodule.

Tag

  • Gt creates, lists, deletes or verifies a tag object signed with GPG.
  • Gts creates a GPG-signed tag.
  • Gtv verifies the GPG signature of tags.
  • Gtx deletes tags with given names.

Main working tree

  • Gws displays the working tree status in short format.
  • GwS displays the working tree status.
  • Gwd displays changes between the working tree and the index (diff).
  • GwD displays changes between the working tree and the index (word diff).
  • Gwr resets the current HEAD to the specified state, does not touch the index nor the working tree.
  • GwR resets the current HEAD, index and working tree to the specified state.
  • Gwc cleans untracked files from the working tree (dry-run).
  • GwC cleans untracked files from the working tree.
  • Gwm moves or renames files.
  • GwM moves or renames files (forced).
  • Gwx removes files from the working tree and from the index (recursively).
  • GwX removes files from the working tree and from the index (recursively and forced).

Working trees

  • GW manages multiple working trees.
  • GWa creates path with a new working tree.
  • GWl lists details of all working trees.
  • GWm moves a working tree to a new location.
  • GWp prunes working tree information.
  • GWx removes a working tree.
  • GWX removes a working tree (forced).

Switch

  • Gy switches branches.

Misc

  • G.. changes the current directory to the top level of the working tree.
  • G? looks up the aliases defined here with the given regular expressions.
  • Gh displays help information about Git

Settings

By default, all aliases are defined with an upper case G prefix, as you can see above. You can use the following zstyle if you wish to customize the prefix used to generate all aliases:

zstyle ':zim:git' aliases-prefix 'g'

Add the zstyle to your ~/.zshrc before where the module is initialized.

Be careful if changing the prefix to lower case g, as the generated aliases can shadow many commands, like gpt for the GUID partition table maintenance utility.

Functions

  • git-alias-lookup lists the aliases defined here searching at the given path, by the given regular expressions.
  • git-branch-current displays the current branch.
  • git-branch-delete-interactive asks for confirmation to also delete the upstream remote branch(es).
  • git-branch-remote-tracking lists all local branches with none or given remote-tracking status (gone, ahead, behind, or ahead behind).
  • git-dir displays the path to the Git directory.
  • git-ignore-add adds any arguments to the .gitignore in the project root.
  • git-root displays the path to the working tree root.
  • git-stash-clear-interactive asks for confirmation before clearing the stash.
  • git-stash-recover recovers given dropped stashed states.
  • git-submodule-move moves a submodule.
  • git-submodule-remove removes a submodule.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].