gitconfig file

My ~/gitconfig

(tuto_git-QpDXWaZY) $ cat ~/.gitconfig


[user]
    name = Patrick VERGAIN
    email = patrick.vergain@id3.eu
[core]
    editor = vim
[push]
    default = simple
[alias]
    dlog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    ci = commit
    co = chekout
    st = status

git config –global credential.helper ‘cache –timeout=28800’

Pour ne pas avoir à taper son username/password à chaque push ou pull.

git config --global credential.helper 'cache --timeout=28800'

git config –global credential.helper cache (without timeout)

without timeout:

git config --global credential.helper cache

Christophe Porteneuve configuration

  1# Put this in your ~/.gitconfig or ~/.config/git/config
  2# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
  3[user]
  4	name = Your Full Name
  5	email = your@email.tld
  6[color]
  7	# Enable colors in color-supporting terminals
  8	ui = auto
  9[alias]
 10	st = status
 11	ci = commit
 12	lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
 13	oops = commit --amend --no-edit
 14	review-local = "!git lg @{push}.."
 15	# Or pre 2.5, as we didn't differential push and upstream in shorthands:
 16	# review-local = lg @{upstream}..
 17[core]
 18	# Don't paginate output by default
 19	pager = cat
 20	#
 21	# Out of luck: on Windows w/o msysGit? You may have Notepad++…
 22	# editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin
 23	#
 24	# If you want to use Sublime Text 2's subl wrapper:
 25	# editor = subl -w
 26	#
 27	# Or Atom, perhaps:
 28	# editor = atom --wait
 29	#
 30	# Sublime Text 2 on Windows:
 31	# editor = 'c:/Program Files (x86)/Sublime Text 2/sublime_text.exe' -w
 32	#
 33	# Sublime Text 3 on Windows:
 34	# editor = 'c:/Program Files/Sublime Text 3/subl.exe' -w
 35	#
 36	# Don't consider trailing space change as a cause for merge conflicts
 37	whitespace = -trailing-space
 38[diff]
 39	# Use better, descriptive initials (c, i, w) instead of a/b.
 40	mnemonicPrefix = true
 41	# Show renames/moves as such
 42	renames = true
 43	# When using --word-diff, assume --word-diff-regex=.
 44	wordRegex = .
 45	# Display submodule-related information (commit listings)
 46	submodule = log
 47[fetch]
 48	# Auto-fetch submodule changes (sadly, won't auto-update)
 49	recurseSubmodules = on-demand
 50[grep]
 51	# Consider most regexes to be ERE
 52	extendedRegexp = true
 53[log]
 54	# Use abbrev SHAs whenever possible/relevant instead of full 40 chars
 55	abbrevCommit = true
 56	# Automatically --follow when given a single path
 57	follow = true
 58[merge]
 59	# Display common-ancestor blocks in conflict hunks
 60	conflictStyle = diff3
 61[mergetool]
 62	# Clean up backup files created by merge tools on tool exit
 63	keepBackup = false
 64	# Clean up temp files created by merge tools on tool exit
 65	keepTemporaries = false
 66	# Put the temp files in a dedicated dir anyway
 67	writeToTemp = true
 68	# Auto-accept file prompts when launching merge tools
 69	prompt = false
 70[pull]
 71	# This is GREAT… when you know what you're doing and are careful
 72	# not to pull --no-rebase over a local line containing a true merge.
 73	# rebase = true
 74	# WARNING! This option, which does away with the one gotcha of
 75	# auto-rebasing on pulls, is only available from 1.8.5 onwards.
 76	rebase = preserve
 77[push]
 78	# Default push should only push the current branch to its push target, regardless of its remote name
 79	default = upstream
 80	# When pushing, also push tags whose commit-ishs are now reachable upstream
 81	followTags = true
 82[rerere]
 83	# If, like me, you like rerere, uncomment these
 84	# autoupdate = true
 85	# enabled = true
 86[status]
 87	# Display submodule rev change summaries in status
 88	submoduleSummary = true
 89	# Recursively traverse untracked directories to display all contents
 90	showUntrackedFiles = all
 91[color "branch"]
 92	# Blue on black is hard to read in git branch -vv: use cyan instead
 93	upstream = cyan
 94[tag]
 95	# Sort tags as version numbers whenever applicable, so 1.10.2 is AFTER 1.2.0.
 96	sort = version:refname
 97[versionsort]
 98	prereleaseSuffix = -pre
 99	prereleaseSuffix = .pre
100	prereleaseSuffix = -beta
101	prereleaseSuffix = .beta
102	prereleaseSuffix = -rc
103	prereleaseSuffix = .rc