Skip to content

Commit

Permalink
master - new file: sync-public-branch.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lj020326 committed Jun 28, 2023
1 parent 644bddd commit 37c0307
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sync-public-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

GIT_DEFAULT_BRANCH=master
GIT_REMOTE_PUBLIC=github

## ref: https://intoli.com/blog/exit-on-errors-in-bash-scripts/
# exit when any command fails
set -e

echo "Push to public repo:"
git push "${GIT_REMOTE_PUBLIC}" "${GIT_DEFAULT_BRANCH}"

0 comments on commit 37c0307

Please sign in to comment.