From 84e54dacfce575caf8f9629426af62944bb0ca63 Mon Sep 17 00:00:00 2001 From: Abhijit Amin Date: Sun, 29 Dec 2019 21:33:58 -0500 Subject: [PATCH] Use static dir name when cloning source git repo. --- git-sync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-sync.sh b/git-sync.sh index 22b3dce..8aef15a 100755 --- a/git-sync.sh +++ b/git-sync.sh @@ -31,6 +31,6 @@ fi echo "SOURCE=$SOURCE_REPO:$SOURCE_BRANCH" echo "DESTINATION=$DESTINATION_REPO:$DESTINATION_BRANCH" -git clone "$SOURCE_REPO" --origin source && cd `basename "$SOURCE_REPO" .git` +git clone "$SOURCE_REPO" source --origin source && cd source git remote add destination "$DESTINATION_REPO" git push destination "${SOURCE_BRANCH}:${DESTINATION_BRANCH}" -f