forked from fboender/multi-git-status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mgitstatus.1
154 lines (154 loc) · 3.43 KB
/
mgitstatus.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
.\" Automatically generated by Pandoc 1.19.2.4
.\"
.TH "MGITSTATUS" "1" "Jul 2019" "" ""
.hy
.SH NAME
.PP
mgitstatus \[en] Show uncommitted, untracked and unpushed changes for
multiple Git repos.
.SH SYNOPSIS
.PP
\f[B]mgitstatus\f[] [\f[B]\-\-version\f[]] [\f[B]\-w\f[]] [\f[B]\-e\f[]]
[\f[B]\-f\f[]] [\f[B]\-\-no\-X\f[]] [\f[B]DIR\f[]] [\f[B]DEPTH=2\f[]]
.SH DESCRIPTION
.PP
\f[B]mgitstatus\f[] shows uncommited, untracked and unpushed changes in
multiple Git repositories.
\f[B]mgitstatus\f[] scans for .git dirs up to \f[B]DEPTH\f[] directories
deep.
The default is 2.
If \f[B]DEPTH\f[] is 0, the scan is infinitely deep.
mgitstatus shows:
.IP \[bu] 2
\f[B]Uncommitted changes\f[] if there are unstaged or uncommitted
changes on the checked out branch.
.IP \[bu] 2
\f[B]Untracked files\f[] if there are untracked files which are not
ignored.
.IP \[bu] 2
\f[B]Needs push (BRANCH)\f[] if the branch is tracking a (remote) branch
which is behind.
.IP \[bu] 2
\f[B]Needs upstream (BRANCH)\f[] if a branch does not have a local or
remote upstream branch configured.
Changes in the branch may otherwise never be pushed or merged.
.IP \[bu] 2
\f[B]Needs pull (BRANCH)\f[] if the branch is tracking a (remote) branch
which is ahead.
This requires that the local git repo already knows about the remote
changes (i.e.
you\[aq]ve done a fetch), or that you specify the \-f option.
mgitstatus does NOT contact the remote by default.
.IP \[bu] 2
\f[B]X stashes\f[] if there are stashes.
.PP
Since there are a lot of different states a git repository can be in,
mgitstatus makes no guarantees that all states are taken into account.
.SH OPTIONS
.TP
.B \f[B]\-\-version\f[]
Show version
.RS
.RE
.TP
.B \f[B]\-w\f[]
Warn about dirs that are not Git repositories
.RS
.RE
.TP
.B \f[B]\-e\f[]
Exclude repos that are \[aq]ok\[aq]
.RS
.RE
.TP
.B \f[B]\-f\f[]
Do a \[aq]git fetch\[aq] on each repo (slow for many repos)
.RS
.RE
.TP
.B \f[B]\-c\f[]
Force color output (preserve colors when using pipes)
.RS
.RE
.PP
You can limit output with the following options:
.TP
.B \f[B]\-\-no\-push\f[]
Do not show branches that need a push.
.RS
.RE
.TP
.B \f[B]\-\-no\-pull\f[]
Do not show branches that need a pull.
.RS
.RE
.TP
.B \f[B]\-\-no\-upstream\f[]
Do not show branches that need an upstream.
.RS
.RE
.TP
.B \f[B]\-\-no\-uncommited\f[]
Do not show branches that have unstaged or uncommitted changes.
.RS
.RE
.TP
.B \f[B]\-\-no\-untracked\f[]
Do not show branches that have untracked files.
.RS
.RE
.TP
.B \f[B]\-\-no\-stashes\f[]
Do now show stashes
.RS
.RE
.SH EXAMPLES
.PP
The following command scans two directories deep for Git projects and
shows their status:
.IP
.nf
\f[C]
$\ mgitstatus\
\&./fboender/sla:\ ok\
\&./fboender/multi\-git\-status:\ Needs\ push\ (master)\ Untracked\ files
\&./other/peewee:\ ok\
\f[]
.fi
.PP
To scan deeper (three dirs instead of two) in the current dir:
.IP
.nf
\f[C]
$\ mgitstatus\ .\ 3
\f[]
.fi
.PP
The following command scans three levels deep in \f[C]/opt/deploy/\f[]
and hides repos that are \[aq]ok\[aq].
It does not show stashes:
.IP
.nf
\f[C]
$\ mgitstatus\ \-e\ \-\-no\-stashes\ /opt/deploy\ 3
\f[]
.fi
.PP
To ignore a repo, set the \f[C]mgitstatus.ignore\f[] git configuration
option for that repo to \f[C]true\f[].
E.g.:
.IP
.nf
\f[C]
$\ cd\ stupidrepo
$\ git\ config\ \-\-local\ mgitstatus.ignore\ true
\f[]
.fi
.SH COPYRIGHT
.PP
Copyright 2016\-2019, Ferry Boender.
.PP
Licensed under the MIT license.
For more information, see the LICENSE.txt file.
.SH AUTHORS
Ferry Boender.