Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git pre-commit hook #341

Merged
merged 1 commit into from
Nov 16, 2021
Merged

Add git pre-commit hook #341

merged 1 commit into from
Nov 16, 2021

Conversation

fhunleth
Copy link
Member

@fhunleth fhunleth commented Oct 2, 2021

No description provided.

@fhunleth
Copy link
Member Author

fhunleth commented Oct 3, 2021

I'm not 100% sure how I feel about pre-commit hooks and committing the scripts to repos. I "think" this help me more than others since you have to opt in to use the hook, and I wouldn't expect most people to opt into pre-commit hooks unless they were contributing a lot to this project.

# git pre-commit hook
#
# Install by:
# $ ln -s ../../pre-commit.sh .git/hooks/pre-commit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ln -s pre-commit.sh .git/hooks/pre-commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ../.. is to go back from .git/hooks to get to the base directory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I get it. 👍

@fhunleth fhunleth merged commit afdf560 into main Nov 16, 2021
@fhunleth fhunleth deleted the pre-commit-hook branch November 16, 2021 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants