X-Git-Url: https://git.distorted.org.uk/~mdw/tig/blobdiff_plain/272818eafff98333c51f1b614704160f265405ed..c36979d964f582a51e2b6e5c8d82d7974218efd1:/manual.txt diff --git a/manual.txt b/manual.txt index a199ad1..fd466db 100644 --- a/manual.txt +++ b/manual.txt @@ -47,11 +47,11 @@ NOTE: If you specify options for the main view, you should not use the `--pretty` option as this option will be set automatically to the format expected by the main view. -Example on how to open the log view and show both author and committer +Example on how to view a commit and show both author and committer information: ----------------------------------------------------------------------------- -$ tig log --pretty=fuller +$ tig show --pretty=fuller ----------------------------------------------------------------------------- See the <> section below for an introduction @@ -65,6 +65,21 @@ Environment Variables Several options related to the interface with git can be configured via environment options. +[[configuration-files]] +Configuration Files +~~~~~~~~~~~~~~~~~~~ + +Upon startup, tig first reads the system wide configuration file +(`{sysconfdir}/tigrc` by default) and then proceeds to read the user's +configuration file (`~/.tigrc` by default). The paths to either of these files +can be overridden through the following environment variables: + +TIGRC_USER:: + Path of the user configuration file. + +TIGRC_SYSTEM:: + Path of the system wide configuration file. + [[repo-refs]] Repository References ~~~~~~~~~~~~~~~~~~~~~ @@ -332,7 +347,10 @@ z Stop all background loading. This can be useful if you use \ the revision log. v Show version. '.' Toggle line numbers on/off. +D Toggle date display on/off. +A Toggle author display on/off. g Toggle revision graph visualization on/off. +F Toggle reference display on/off (tag and branch names). ':' Open prompt. This allows you to specify what git command \ to run. Example `:log -p` u Update status of file. In the status view, this allows you to add an \ @@ -340,6 +358,26 @@ u Update status of file. In the status view, this allows you to add an \ running git-add ). In the stage view, when pressing this on \ a diff chunk line stages only that chunk for next commit, when not on \ a diff chunk line all changes in the displayed diff is staged. +M Resolve unmerged file by launching git-mergetool(1). Note, to work \ + correctly this might require some initial configuration of your \ + preferred merge tool. See the manpage of git-mergetool(1). +',' Move tree view to the parent tree. +e Open file in editor. +----------------------------------------------------------------------------- + +[[external-commands]] +External Commands +~~~~~~~~~~~~~~~~~ + +Tig also comes with a few builtin external commands. These are simple shell +commands that are run and can take arguments from the current browsing state, +such as the current commit ID. The default commands are: + +`-------`-------------------------------------------------------------------- +Key Action +----------------------------------------------------------------------------- +C git cherry-pick %(commit) +G git gc ----------------------------------------------------------------------------- [[refspec]] @@ -364,16 +402,16 @@ If you are interested only in those revisions that made changes to a specific file (or even several files) list the files like this: ----------------------------------------------------------------------------- -$ tig log Makefile README +$ tig Makefile README ----------------------------------------------------------------------------- -To avoid ambiguity with repository references such as tag name, be sure to -separate file names from other git options using "\--". So if you have a file -named 'master' it will clash with the reference named 'master', and thus you -will have to use: +To avoid ambiguity with tig's subcommands or repository references such as tag +name, be sure to separate file names from other git options using "\--". So if +you have a file named 'status' it will clash with the 'status' subcommand, and +thus you will have to use: ----------------------------------------------------------------------------- -$ tig log -- master +$ tig -- status ----------------------------------------------------------------------------- NOTE: For the main view, avoiding ambiguity will in some cases require you to @@ -392,7 +430,7 @@ If you are only interested in changed that happened between two dates you can use: ----------------------------------------------------------------------------- -$ tig -- --after="May 5th" --before="2006-05-16 15:44" +$ tig --after="May 5th" --before="2006-05-16 15:44" ----------------------------------------------------------------------------- NOTE: If you want to avoid having to quote dates containing spaces you can use @@ -406,7 +444,7 @@ Alternatively, commits can be limited to a specific range, such as "all commits between 'tag-1.0' and 'tag-2.0'". For example: ----------------------------------------------------------------------------- -$ tig log tag-1.0..tag-2.0 +$ tig tag-1.0..tag-2.0 ----------------------------------------------------------------------------- This way of commit limiting makes it trivial to only browse the commits which @@ -414,7 +452,7 @@ haven't been pushed to a remote branch. Assuming 'origin' is your upstream remote branch, using: ----------------------------------------------------------------------------- -$ tig log origin..HEAD +$ tig origin..HEAD ----------------------------------------------------------------------------- will list what will be pushed to the remote branch. Optionally, the ending @@ -433,7 +471,7 @@ If you prefer to specify which commit to preview in this way use the following: ----------------------------------------------------------------------------- -$ tig log tag-2.0 ^tag-1.0 +$ tig tag-2.0 ^tag-1.0 ----------------------------------------------------------------------------- You can think of '^' as a negation operator. Using this alternate syntax, it @@ -448,7 +486,7 @@ say "show at most 20 commits from within the last month that changed files under the Documentation/ directory." ----------------------------------------------------------------------------- -$ tig -- --since=1.month -n20 -- Documentation/ +$ tig --since=1.month -n20 -- Documentation/ ----------------------------------------------------------------------------- [[refspec-all]] @@ -461,7 +499,7 @@ repository change a particular file within the last week". This can be accomplished using: ----------------------------------------------------------------------------- -$ tig -- --all --since=1.week -- Makefile +$ tig --all --since=1.week -- Makefile ----------------------------------------------------------------------------- include::BUGS[] @@ -490,11 +528,6 @@ Online resources: include::SITES[] -Git porcelains: - - - link:http://www.kernel.org/pub/software/scm/git/docs/[git], - - link:http://www.kernel.org/pub/software/scm/cogito/docs/[Cogito] - Other git repository browsers: - gitk(1)