This repo contains my .gitconfig file with different options and aliases I've enabled.
Sets the pager to be delta
instead of less
Warning
For this pager to work you need to first install it.
local-name
: set a specific username different from global in a local folderlocal-email
: set a specific email different from global in a local folderclear
: reset directly the branch toHEAD
force
: performs a forced push with leasecontinue
: continues a rebase in progressstop
: aborts a rebase in progressshowalias
: shows all configured aliaseslg
: prints the log with a custom format using--pretty
new
: shows the commits in yourHEAD
that are not inmain
missing
: shows the commits inmain
that are not inHEAD
tree
: shows git log as a graphfixup
: shortcut to not writecommit --fixup
every timepatch
: shortcut to avoid writingadd --patch
every time
Tip
The new
and missing
commands are configured to run with master
rather than main
due to my job's typical branch naming.
You should change it according to your specification.
Sets the default pull method to use rebase instead of merge.
The autoStash
option performs automatic stashs when we do a rebase and have unstaged files in the working directoy. Once the rebase is finished, the stash is poped automatically.
The autosquash
option allow us to organize automatically commits we will want to squash with previous commits. This is done by commiting doing git commit --fixup <old_hash_commit_to_squash_with>
Once enabled, the rerere
feature will record solved conflicts so if we encounter them again git already knows how to act.
You can clone this repository and copy the gitconfig file whenever you want.
To allow your machine's .gitconfig file to use (mainly) my aliases you should include the following in your .gitconfig file.
Note
This file tends to be in your home directory
[include]
path = /path/to/my_gitconfig_file