Created
May 21, 2014 07:06
-
-
Save publicJorn/cf7214cbad8248d34d7c to your computer and use it in GitHub Desktop.
default git config, copied from @dandydev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# Korte log van de laatste 20 commits met enkel SHA's en omschrijving. | |
l = log --pretty=oneline -n 20 --graph | |
# Gecondenseerde versie van status. Handig als snel overzicht. | |
s = status -s | |
# Status shorthand | |
st = status | |
# Laat diff zien tussen laatste commit en huidige staat van working copy | |
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat" | |
# `git di $number` laat diff zien tussen huidige staat en $number revisions geleden | |
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" | |
# Pull in remote changes for the current repository and all its submodules | |
up = !"git pull; git submodule foreach git pull origin master" | |
# Push shorthand | |
p = push | |
# Clone een repository met alle submodules | |
c = clone --recursive | |
# Commit all changes | |
ca = !git add -A && git commit -av | |
# Commit & add shorthand | |
cm = commit -am | |
# Switch naar een branch en maak deze aan als ie nog niet bestaat | |
go = checkout -B | |
# Verbose overzicht van tags, branches en remotes (incl. URL bij remotes) | |
tags = tag -l | |
branches = branch -a | |
remotes = remote -v | |
# Undo laatste `git push` | |
undopush = push -f origin HEAD^:master | |
# Super mooie log incl. grafische weergave van branches... IN DE TERMINAL | |
lg = "log --pretty=format:'%C(yellow)%h%C(reset) %C(blue)%an%C(reset) %C(cyan)%cr%C(reset) %s %C(green)%d%C(reset)' --graph --date-order" | |
[core] | |
# Vul editor naar keuze in | |
editor = sublime -w | |
# KLEURTJES! | |
[color] | |
# Use colors in Git commands that are capable of colored output when outputting to the terminal | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
# Gebruik 'origin' altijd als default remote in de 'master' branch | |
[branch "master"] | |
remote = origin | |
merge = refs/heads/master | |
[push] | |
default = simple | |
# Gebruik bij pull ALTIJD rebase, ook als je t niet aangeeft. Als je dit in je config zet, veranderen bestaande branches niet automatisch mee qua gedrag. Pas hiervoor de config van de betreffende repos aan. | |
[branch] | |
autosetuprebase = always | |
[branch "master"] | |
rebase = true | |
[branch "dev"] | |
rebase = true | |
# Je gebruikersgegevens om commits te kunnen herleiden naar jou. | |
[user] | |
name = My Name | |
email = me@domain.ext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment