1+ .. highlight :: bash 
2+ 
13.. _configure-git :
24
35=============== 
911Overview
1012======== 
1113
12- Your personal git _  configurations are saved in the ``.gitconfig `` file in
14+ Your personal git  configurations are saved in the ``.gitconfig `` file in
1315your home directory.
14- Here is an example ``.gitconfig `` file::
16+ 
17+ Here is an example ``.gitconfig `` file:
18+ 
19+ .. code-block :: none 
1520
1621  [user] 
1722          name = Your Name 
@@ -20,8 +25,8 @@ Here is an example ``.gitconfig`` file::
2025  [alias] 
2126          ci = commit -a 
2227          co = checkout 
23-           st = status -a  
24-           stat = status -a  
28+           st = status 
29+           stat = status 
2530          br = branch 
2631          wdiff = diff --color-words 
2732
@@ -31,13 +36,6 @@ Here is an example ``.gitconfig`` file::
3136  [merge] 
3237          summary = true 
3338
34-   [apply] 
35-           whitespace = fix 
36- 
37-   [core] 
38-           autocrlf = input 
39- 
40- 
4139 You can edit this file directly or you can use the ``git config --global ``
4240command::
4341
6967  git config --global user.email [email protected]  7068
7169This will write the settings into your git configuration file,  which
72- should now contain a user section with your name and email::
70+ should now contain a user section with your name and email:
71+ 
72+ .. code-block :: none 
7373
7474  [user] 
7575        name = Your Name 
@@ -97,7 +97,9 @@ The following ``git config --global`` commands::
9797  git config --global alias.wdiff "diff --color-words" 
9898
9999will create an ``alias `` section in your ``.gitconfig `` file with contents
100- like this::
100+ like this:
101+ 
102+ .. code-block :: none 
101103
102104  [alias] 
103105          ci = commit -a 
@@ -117,7 +119,9 @@ You may also want to make sure that your editor of choice is used ::
117119Merging
118120------- 
119121
120- To enforce summaries when doing merges (``~/.gitconfig `` file again)::
122+ To enforce summaries when doing merges (``~/.gitconfig `` file again):
123+ 
124+ .. code-block :: none 
121125
122126   [merge] 
123127      log = true 
@@ -126,5 +130,43 @@ Or from the command line::
126130
127131  git config --global merge.log true 
128132
133+ .. _fancy-log :
134+ 
135+ Fancy log output
136+ ---------------- 
137+ 
138+ This is a very nice alias to get a fancy log output; it should go in the
139+ ``alias `` section of your ``.gitconfig `` file:
140+ 
141+ .. code-block :: none 
142+ 
143+     lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative 
144+ 
145+  You use the alias with::
146+ 
147+     git lg 
148+ 
149+ and it gives graph / text output something like this (but with color!):
150+ 
151+ .. code-block :: none 
152+ 
153+     * 6d8e1ee - (HEAD, origin/my-fancy-feature, my-fancy-feature) NF - a fancy file (45 minutes ago) [Matthew Brett] 
154+     *   d304a73 - (origin/placeholder, placeholder) Merge pull request #48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst] 
155+     |\   
156+     | * 4aff2a8 - fixed bug 35, and added a test in test_bugfixes (2 weeks ago) [Hugo] 
157+     |/   
158+     * a7ff2e5 - Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster] 
159+     * 68f6752 - Initial implimentation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr 
160+     *   376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst] 
161+     |\   
162+     | * b605216 - updated joshu example to current api (3 weeks ago) [Jonathan Terhorst] 
163+     | * 2e991e8 - add testing for outer ufunc (3 weeks ago) [Jonathan Terhorst] 
164+     | * 7beda5a - prevent axis from throwing an exception if testing equality with non-axis object (3 weeks ago) [Jonathan Terhorst] 
165+     | * 65af65e - convert unit testing code to assertions (3 weeks ago) [Jonathan Terhorst] 
166+     | *   956fbab - Merge remote-tracking branch 'upstream/master' (3 weeks ago) [Jonathan Terhorst] 
167+     | |\   
168+     | |/ 
169+ 
170+  Thanks to Yury V. Zaytsev for posting it.
129171
130172.. include :: links.inc 
0 commit comments