summaryrefslogtreecommitdiff
path: root/mkgit-client
diff options
context:
space:
mode:
authorHaoran S. Diao <0@hairydiode.xyz>2019-02-11 17:52:45 -0500
committerHaoran S. Diao <0@hairydiode.xyz>2019-02-11 17:52:45 -0500
commit945c9b851a2ba97acec0bd7efab44f492f30aa67 (patch)
treecc98fdb702c510dc0c801a76f7d70849ae9c5a79 /mkgit-client
initial commit
Diffstat (limited to 'mkgit-client')
-rwxr-xr-xmkgit-client10
1 files changed, 10 insertions, 0 deletions
diff --git a/mkgit-client b/mkgit-client
new file mode 100755
index 0000000..1cfb245
--- /dev/null
+++ b/mkgit-client
@@ -0,0 +1,10 @@
+#!/bin/bash
+if [ $1 == "" ]; then
+ echo usage: mkgit-client [repository name]
+fi
+git remote add origin git@hairydiode.xyz:$1
+git push --set-upstream origin master
+BRANCHES=$(git branch | sed "s/*//g")
+for BRANCH in ${BRANCHES[@]}; do
+ git branch $BRANCH --set-upstream-to origin/$BRANCH
+done