Commit | Line | Data |
---|---|---|
c3c24b0b | 1 | tig(1) |
8eb62770 JF |
2 | ====== |
3 | ||
4 | NAME | |
5 | ---- | |
6 | tig - text-mode interface for git | |
7 | ||
8 | SYNOPSIS | |
9 | -------- | |
10 | [verse] | |
77452abc JF |
11 | tig [options] [revisions] [--] [paths] |
12 | tig show [options] [revisions] [--] [paths] | |
8a680988 | 13 | tig blame [rev] path |
77452abc JF |
14 | tig status |
15 | tig < [git command output] | |
8eb62770 JF |
16 | |
17 | DESCRIPTION | |
18 | ----------- | |
19 | Browse changes in a git repository. Additionally, tig(1) can also act | |
20 | as a pager for output of various git commands. | |
21 | ||
22 | When browsing repositories, tig(1) uses the underlying git commands | |
23 | to present the user with various views, such as summarized commit log | |
24 | and showing the commit with the log message, diffstat, and the diff. | |
25 | ||
26 | Using tig(1) as a pager, it will display input from stdin and try | |
27 | to colorize it. | |
28 | ||
29 | OPTIONS | |
30 | ------- | |
31 | ||
77452abc JF |
32 | Command line options recognized by tig include all valid git-log(1) and |
33 | git-diff(1) options, as well as the following subcommands and tig specific | |
34 | options. The first command line parameter not starting with "-" is interpreted | |
35 | as being either a revision specification or a path and will end the option | |
36 | parsing. All following options will be passed untouched to the underlying git | |
37 | command. | |
8eb62770 | 38 | |
77452abc JF |
39 | show:: |
40 | Open diff view using the given git show options. | |
8eb62770 | 41 | |
8a680988 JF |
42 | blame:: |
43 | Show given file annotated or blamed by commits. | |
44 | Optionally limited from given revision. | |
45 | ||
77452abc | 46 | status:: |
173d76ea JF |
47 | Start up in status view. |
48 | ||
8eb62770 JF |
49 | -v, --version:: |
50 | Show version and exit. | |
51 | ||
52 | -h, --help:: | |
53 | Show help message and exit. | |
54 | ||
55 | \--:: | |
77452abc JF |
56 | End of tig options. This ends tig option parsing, and passes any |
57 | following options untouched to the underlying git command. Kept for | |
58 | compatibility and will be deprecated in a future version. | |
8eb62770 | 59 | |
d3e4750b DV |
60 | EXAMPLES |
61 | -------- | |
62 | ||
63 | Display the current branch: | |
64 | ----------------------------------------------------------------------------- | |
65 | $ tig | |
66 | ----------------------------------------------------------------------------- | |
67 | ||
68 | Display one or more specific branches: | |
69 | ----------------------------------------------------------------------------- | |
70 | $ tig test master | |
71 | ----------------------------------------------------------------------------- | |
72 | ||
73 | Display all branches: | |
74 | ----------------------------------------------------------------------------- | |
77452abc | 75 | $ tig --all |
d3e4750b DV |
76 | ----------------------------------------------------------------------------- |
77 | ||
78 | Display differences between two branches: | |
79 | ----------------------------------------------------------------------------- | |
80 | $ tig test..master | |
81 | ----------------------------------------------------------------------------- | |
82 | ||
83 | Display changes for a single file: | |
84 | ----------------------------------------------------------------------------- | |
85 | $ tig -- README | |
86 | ----------------------------------------------------------------------------- | |
87 | ||
77452abc JF |
88 | Display contents of the README file in a specific revision: |
89 | ----------------------------------------------------------------------------- | |
90 | $ tig show tig-0.8:README | |
91 | ----------------------------------------------------------------------------- | |
92 | ||
d3e4750b DV |
93 | Display revisions between two dates for a specific file: |
94 | ----------------------------------------------------------------------------- | |
77452abc | 95 | $ tig --after="2004-01-01" --before="2006-05-16" -- README |
d3e4750b DV |
96 | ----------------------------------------------------------------------------- |
97 | ||
8eb62770 JF |
98 | ENVIRONMENT VARIABLES |
99 | --------------------- | |
c3c24b0b JF |
100 | |
101 | In addition to environment variables used by git (e.g. GIT_DIR), tig defines | |
102 | the following: | |
103 | ||
b6607e7e DV |
104 | TIGRC_USER:: |
105 | Path of the user configuration file (defaults to `~/.tigrc`). | |
106 | ||
107 | TIGRC_SYSTEM:: | |
108 | Path of the system wide configuration file (defaults to | |
109 | `{sysconfdir}/tigrc`). | |
110 | ||
8eb62770 JF |
111 | TIG_LS_REMOTE:: |
112 | Set command for retrieving all repository references. The command | |
113 | should output data in the same format as git-ls-remote(1). | |
114 | ||
115 | TIG_DIFF_CMD:: | |
116 | The command used for the diff view. By default, git show is used | |
117 | as a backend. | |
118 | ||
119 | TIG_LOG_CMD:: | |
120 | The command used for the log view. If you prefer to have both | |
121 | author and committer shown in the log view be sure to pass | |
122 | `--pretty=fuller` to git log. | |
123 | ||
124 | TIG_MAIN_CMD:: | |
125 | The command used for the main view. Note, you must always specify | |
126 | the option: `--pretty=raw` since the main view parser expects to | |
127 | read that format. | |
128 | ||
e733ee54 JF |
129 | Tree commands |
130 | ~~~~~~~~~~~~~ | |
131 | TIG_TREE_CMD:: | |
132 | The command used for the tree view. By default, git-ls-tree(1) is | |
133 | used. The commands should expect first the commit ID and second | |
134 | a path. | |
598b9e7d | 135 | |
e733ee54 JF |
136 | TIG_BLOB_CMD:: |
137 | The command used for the blob view. By default, git-cat-file(1) is | |
138 | used. The command gets the blob ID. | |
139 | ||
8eb62770 JF |
140 | FILES |
141 | ----- | |
142 | '~/.tigrc':: | |
511147de | 143 | User configuration file. See gitlink:tigrc[5] for examples. |
8eb62770 | 144 | |
b6607e7e DV |
145 | '{sysconfdir}/tigrc':: |
146 | System wide configuration file. | |
147 | ||
c3c24b0b | 148 | '$GIT_DIR/config':: |
f7ffec06 | 149 | Repository config file. Read on start-up with the help of |
c3c24b0b | 150 | git-config(1). |
8eb62770 JF |
151 | |
152 | include::BUGS[] | |
153 | ||
154 | COPYRIGHT | |
155 | --------- | |
8a680988 | 156 | Copyright (c) 2006-2008 Jonas Fonseca <fonseca@diku.dk> |
8eb62770 JF |
157 | |
158 | This program is free software; you can redistribute it and/or modify | |
159 | it under the terms of the GNU General Public License as published by | |
160 | the Free Software Foundation; either version 2 of the License, or | |
161 | (at your option) any later version. | |
162 | ||
163 | SEE ALSO | |
164 | -------- | |
511147de | 165 | |
e664e260 JF |
166 | gitlink:tigrc[5], git(7), cogito(7), as well as other git repository browsers: |
167 | gitk(1), qgit(1), gitview(1). | |
8eb62770 | 168 | |
e664e260 | 169 | Online resources: |
8eb62770 JF |
170 | |
171 | include::SITES[] |