[go: nahoru, domu]

Skip to content

Commit

Permalink
Update git-sync.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigo-m committed Jul 17, 2023
1 parent 7f014a2 commit 21729e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ echo "DESTINATION=$DESTINATION_REPO:$DESTINATION_BRANCH"

if [[ -n "$SOURCE_SSH_PRIVATE_KEY" ]]; then
# Clone using source ssh key if provided
git clone -c core.sshCommand="/usr/bin/ssh -i ~/.ssh/src_rsa" "$SOURCE_REPO" /root/source --origin source --depth 1 && cd /root/source
git clone -c core.sshCommand="/usr/bin/ssh -i ~/.ssh/src_rsa" "$SOURCE_REPO" /root/source --origin source && cd /root/source
# Create an orphaned branch without history
git checkout --orphan orphaned_branch
git commit -m "handoff"
else
git clone "$SOURCE_REPO" /root/source --origin source && cd /root/source
fi
Expand Down

0 comments on commit 21729e7

Please sign in to comment.