Skip to content

Commit

Permalink
Merge pull request #3 from rasodu/static-dir-name-for-folder
Browse files Browse the repository at this point in the history
Use static dir name when cloning source git repo.
  • Loading branch information
wei authored Apr 16, 2020
2 parents aae584d + 84e54da commit ca48412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca48412

Please sign in to comment.