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