1GIT-INFO(1)                       Git Extras                       GIT-INFO(1)
2
3
4

NAME

6       git-info - Returns information on current repository
7

SYNOPSIS

9       git-info [-c|--color] [--no-config]
10

DESCRIPTION

12       Shows the following information about a repository:
13
14       1.  Remote Url(s)
15
16       2.  Remote Branches
17
18       3.  Local Branches
19
20       4.  Submodule(s) (if present)
21
22       5.  Most recent commit
23
24       6.  Configuration Info
25
26
27

OPTIONS

29       -c, --color
30
31       Use color for information titles.
32
33       --no-config
34
35       Don´t show list all variables set in config file, along with their val‐
36       ues.
37

GIT CONFIGS

39       You could customize the Most recent commit and Configuration Info  for‐
40       mat via git config options
41
42
43
44           $ git config --global --add git-extras.info.log "<log-command>"
45
46
47
48       the default log-command is "git log --max-count=1 --pretty=short"
49
50
51
52           $ git config --global --add git-extras.info.config-grep "<config-grep-command>"
53
54
55
56       the default config-grep-command is "git config --list"
57
58       For example,
59
60       to set global configuration to show last commit subject, without sha1
61
62
63
64            $ git config --global --add git-extras.info.log "git log --max-count=1 --format=\"Author: %an%nDate:   %ad (%ar)%n%n    %s\" --date=format:\"%Y-%m-%d %a %H:%M\""
65
66
67
68       to set global configuration to show user´s name and email
69
70
71
72            $ git config --global --add git-extras.info.config-grep "git config --list | grep --color=never -E \"^user.name|^user.email\""
73
74
75

EXAMPLES

77       Outputs info about a repo:
78
79
80
81           $ git info
82
83           ## Remote URLs:
84
85           origin      git@github.com:sampleAuthor/git-extras.git (fetch)
86           origin      git@github.com:sampleAuthor/git-extras.git (push)
87
88           ## Remote Branches:
89
90           origin/HEAD -> origin/master
91           origin/myBranch
92
93           ## Local Branches:
94
95           myBranch
96           * master
97
98           ## Submodule(s):
99
100             a234567 path2submodule1/submodule1 (branch/tag)
101           + b234567 path2submodule2/submodule2 (branch/tag)
102           - c234567 path2submodule3/submodule3 (branch/tag)
103             e234567 path2submodule4/submodule4 (branch/tag)
104
105           ## Most Recent Commit:
106
107           commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7
108           Author: Sample Author <sampleAuthor@gmail.com>
109
110           Added git-info command.
111
112           ## Configuration (.git/config):
113
114           color.diff=auto
115           color.status=auto
116           color.branch=auto
117           user.name=Sample Author
118           user.email=sampleAuthor@gmail.com
119           core.repositoryformatversion=0
120           core.filemode=true
121           core.bare=false
122           core.logallrefupdates=true
123           core.ignorecase=true
124           remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
125           remote.origin.url=git@github.com:mub/git-extras.git
126           branch.master.remote=origin
127           branch.master.merge=refs/heads/master
128
129
130

AUTHOR

132       Written by Leila Muhtasib <muhtasib@gmail.com>
133

REPORTING BUGS

135       <https://github.com/tj/git-extras/issues>
136

SEE ALSO

138       <https://github.com/tj/git-extras>
139
140
141
142                                  August 2020                      GIT-INFO(1)
Impressum