Skip to content

Commit

Permalink
skip commiting if remote is github (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Daishogun authored May 8, 2023
1 parent 343ce42 commit 2c30719
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/post-commit.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

if [[ $(git config --get remote.origin.url) == *"github"* ]]; then
echo "skipping sync commit since remote is github."
exit 0
fi
commit_message=$(git log -n 1 HEAD --pretty=format:%s)
branch_name=$(git branch --show-current)
repo_name=$(basename -s .git `git config --get remote.origin.url`)
Expand Down
5 changes: 5 additions & 0 deletions scripts/pre-push.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

if [[ $(git config --get remote.origin.url) == *"github"* ]]; then
echo "skipping sync commit push since remote is github."
exit 0
fi

syncommit push

exit 0

0 comments on commit 2c30719

Please sign in to comment.