summaryrefslogtreecommitdiffstats
path: root/.gitconfig
blob: be8aad9072e82f81c42a4da1c91d1dbb46b43b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Most of the configuration stolen from here:
#   https://github.com/arrelid/preferences/blob/master/dotfiles/gitconfig

[alias]
  ap = add --patch
  br = branch
  ci = commit
  cia = commit --amend
  co = checkout
  df = diff
  dfc = diff --cached
  st = status

  # When cherry-picking, put the original commit hash in the commit message.
  cp = cherry-pick -x

  # Tips and tricks for how to make logging prettier
  # http://robey.lag.net/2008/07/13/git-for-the-real-world.html
  # http://www.jukie.net/~bart/blog/pimping-out-git-log
  lg = log --graph --topo-order --abbrev-commit --date=relative --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cred<%an>%Creset'

  # git will outsmart you and try to fast-forward when you merge, i.e. history wont
  # show that you've worked on a branch. This is just fine in most cases, but it's
  # not the right thing for feature branches, and hence you need to tell git not
  # to fast-forward when merging in these cases.
  mgnf = merge --no-ff

  # When stashing, keep the stuff you've already added to the index in there. In
  # other words, stash whatever git diff tells you differs.
  stu = stash --keep-index

  # For those times when you just want to rewind time...
  uncommit = reset --soft HEAD^
  unstage = reset HEAD

[branch]
  autosetuprebase = always

[color]
  ui = auto

[core]
  autocrlf = input
  safecrlf = true
  whitespace = trailing-space,space-before-tab
  excludesfile = ~/.gitignore
  quotepath = false

[gc]
  # Perform GC automagically, when needed
  auto = 1

[merge]
  # Show common ancestor when merge fails
  # http://psung.blogspot.com/2011/02/reducing-merge-headaches-git-meets.html
  conflictstyle = diff3

  # The default merge commit message is fairly meaningless, so lets include
  # a summary of what the merge includes
  summary = true

[push]
  # Only push the current branch you're on
  default = tracking

[rerere]
  # Reuse previously recorded merge solution
  # http://psung.blogspot.com/2011/02/reducing-merge-headaches-git-meets.html
  enabled = 1

[user]
  name = Ravi R Kiran
  email = aine.marina@gmail.com