projects
/
dotFiles
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e9a0ad
)
Added rgit script
author
Cian Bagshaw
<cian@cianb.xyz>
Sun, 15 Jan 2023 16:44:11 +0000
(16:44 +0000)
committer
Cian Bagshaw
<cian@cianb.xyz>
Sun, 15 Jan 2023 16:44:11 +0000
(16:44 +0000)
Script for automatically creating and adding remote git repos
.local/bin/rgit
[new file with mode: 0755]
patch
|
blob
diff --git a/.local/bin/rgit
b/.local/bin/rgit
new file mode 100755
(executable)
index 0000000..
5aa4b6a
--- /dev/null
+++ b/
.local/bin/rgit
@@ -0,0
+1,17
@@
+#!/bin/sh
+
+# login
+USER=root
+HOST=cianb.xyz
+
+# git dir
+DIR=/var/www/git.cianb.xyz
+
+# init script
+SCRIPT="cd $DIR; sudo -u git mkdir $1; sudo -u git git init $1 --bare"
+
+# login and run
+ssh $USER@$HOST $SCRIPT
+
+# add remote
+git remote add origin git@$HOST:$DIR/$1