Skip to content

Standard aliases, practical configuration and special commands that will let you work like a git ninja.

Notifications You must be signed in to change notification settings

jan-warchol/git-tools

Repository files navigation

Git tools

Screenshot of sensible-dotfiles

Most common aliases and sensible config options for a more pleasant git experience.

Installation

Automatic

Clone the repo and run installation script:

git clone https://github.com/jan-warchol/git-tools
./git-tools/install.sh

Manual

  1. Clone this repo
  2. Add it to your PATH to make new git commands available
  3. Source bash-completion.sh in your bash configuration to enable autocompletion for new commands
  4. Import settings from .gitconfig into your git configuration file
  5. Edit your PS1 variable to include \$(__git_ps1)

Features

New commands and common aliases:

  • git pretty-log (aliased to git l) - clear, readable and concise log.
  • git divergence A B C - show how multiple branches A B and C differ (relative to common ancestor).
  • git smart-commit (aliased to git ci) - wrapper for git commit that automatically includes modified files (if you don't specify what to commit) and doesn't require quotes for commit message - example: git ci Update files
  • git submodule-details - see how current submodule status is related to what is recorded in the superproject (show relevant history graph). Especially helpful when there are merge conflicts.
  • git explain-conflict - display history of changes that led to merge conflict.
  • Common aliases/shorthands, including co, br and st
  • Additional log aliases la, ll, lp to show more information from repo history.

Settings that should have been the default:

  • improved output layout and coloring for status, blame and log,
  • better display of merge conflicts, info about copied files etc.

Other good stuff

See sensible dotfiles for a collection of settings for other command-line tools.

About

Standard aliases, practical configuration and special commands that will let you work like a git ninja.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages