Most common aliases and sensible config options for a more pleasant git experience.
Clone the repo and run installation script:
git clone https://github.com/jan-warchol/git-tools
./git-tools/install.sh
- Clone this repo
- Add it to your PATH to make new git commands available
- Source
bash-completion.sh
in your bash configuration to enable autocompletion for new commands - Import settings from
.gitconfig
into your git configuration file - Edit your
PS1
variable to include\$(__git_ps1)
New commands and common aliases:
git pretty-log
(aliased togit l
) - clear, readable and concise log.git divergence A B C
- show how multiple branchesA
B
andC
differ (relative to common ancestor).git smart-commit
(aliased togit ci
) - wrapper forgit 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
andst
- 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
andlog
, - better display of merge conflicts, info about copied files etc.
See sensible dotfiles for a collection of settings for other command-line tools.