Created
March 9, 2024 13:23
-
-
Save sadamczyk/531f8ae3dc92ea87196a4081cda07d59 to your computer and use it in GitHub Desktop.
Prevent github backlinks in commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Place this file in .git/hooks/commit-msg in a repo you don't want backlinks to happen from. | |
# This prevents ALL backlinks from commit messages. References in descriptions/comments are obviously not affected. | |
# Simply replace all github.com links with www.github.com | |
# https://github.com/orgs/community/discussions/23123#discussioncomment-3239240 | |
sed -i 's|https://github.com|https://www.github.com|g' "$1" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment