Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Lartu
mgit
Commits
3b125691
Commit
3b125691
authored
5 years ago
by
Lartu
🐕
Browse files
Options
Download
Email Patches
Plain Diff
Added pullall
parent
8924aa2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
mgit
mgit
+19
-8
No files found.
mgit
View file @
3b125691
...
...
@@ -14,16 +14,27 @@ if len(args) == 0:
print
(
f
"
\n
This is the Multicentralized Git Toolbox (mgit)
{
VERSION
}
"
)
print
(
f
" Created by Martín del Río (www.lartu.net)."
)
print
(
f
" Distributed under the MIT license.
\n
"
)
elif
len
(
args
)
and
args
[
0
]
==
"pushall"
:
elif
len
(
args
)
and
args
[
0
]
in
(
"pushall"
,
"pullall"
)
:
gitRemote
=
check_output
([
'git'
,
'remote'
]).
decode
(
'UTF-8'
)
remotes
=
gitRemote
.
split
(
"
\n
"
)
for
remote
in
remotes
:
remote
=
remote
.
strip
()
if
len
(
remote
)
==
0
:
continue
gitCommand
=
f
"git push -u
{
remote
}
master"
print
(
f
"
\033
[1;32mExecuting:
\033
[0m
{
gitCommand
}
"
)
os
.
system
(
gitCommand
)
if
args
[
0
]
==
"pushall"
:
for
remote
in
remotes
:
remote
=
remote
.
strip
()
if
len
(
remote
)
==
0
:
continue
gitCommand
=
f
"git push -u
{
remote
}
master"
print
(
f
"
\033
[1;32mExecuting:
\033
[0m
{
gitCommand
}
"
)
os
.
system
(
gitCommand
)
elif
args
[
0
]
==
"pullall"
:
for
remote
in
remotes
:
remote
=
remote
.
strip
()
if
len
(
remote
)
==
0
:
continue
gitCommand
=
f
"git pull
{
remote
}
master"
print
(
f
"
\033
[1;32mExecuting:
\033
[0m
{
gitCommand
}
"
)
os
.
system
(
gitCommand
)
else
:
print
(
"Plase use 'git' for non mgit commands"
)
quit
(
1
)
#Could not resolve host
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment