Skip to content
Search

ToolGit

lastmod 2024-11-06created 2024-11-061 edits

Git productivity toolkit.

A collection of scripts that add a number of subcommands to Git to make life easier

Installation

Extract it to a folder and add it to PATH; Git recognizes git-* files as subcommands

Installing aliases:

git config set --append --global include.path path/to/toolgit/aliases.ini

Commands

  • git amend - Amend with the currently staged changes (Alias)
  • git-delete-gone-branches - Delete local branches that no longer exist on the remote
  • git dir - Print the path of this Git repository's .git directory (Alias)
  • git-force-pull - Fetch the remote tracking branch and force pull using a hard reset
  • git-forward - Fetch all remote tracking branches and fast-forward
  • git gc-all - Expire the reflog and run full garbage collection on the Git repository (Alias)
  • git graph - Show a pretty commit graph (Alias)
  • git-in-repo - Return 0 if the current working directory is a Git repository, nonzero otherwise
  • git-is-branch-remote - Return 0 if the branch refers to a remote branch
  • git-is-head-detached - Return 0 if HEAD is detached, nonzero otherwise
  • git-is-worktree-clean - Return 0 if the working tree has no changes or untracked files, nonzero otherwise
  • git-legacy - Rebase the entire history of the current HEAD on top of
  • git-main-branch - Get the name of the main (default) branch
  • git-mode-restore - Restore file modes from the index and/or working tree
  • git root - Print the root path of this Git repository
  • git-xlog - Search string history only in added or removed lines

See also

Favorite site

author Zer0 sitemap