Create DefaultCommits.md

This commit is contained in:
youngchief btw ツ 2021-06-25 10:41:47 -07:00 committed by GitHub
parent 9c94b00c57
commit 081ec3ef34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

20
docs/md/DefaultCommits.md Normal file
View File

@ -0,0 +1,20 @@
# Default Commits
### Stopping them (from [here](https://glitch.com/edit/#!/stop-default-commits?path=README.md%3A1%3A0))
Here's the script if the project gets deleted or hit with many requests.
```bash
echo '#!/bin/sh
# if the prepared commit message ends with "Checkpoint", abort the commit
if grep -q "Checkpoint$" "$1"; then
echo "Skipping default commit" >> /tmp/message
exit 1
fi' > /app/.git/hooks/prepare-commit-msg && chmod +x /app/.git/hooks/prepare-commit-msg
```
### Re-enabling them
```bash
rm -rf /app/.git/hooks/prepare-commit-msg
```