Skip to content

github_email_verify: Avoid committing to github with your corporate email

License

Notifications You must be signed in to change notification settings

kintoandar/git-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Table of Contents

Collection of git hooks

pre-commit hooks

github_email_verify

This hook reminds you if you forgot to change your local personal email on a github repo, but you still want to use your professional email globally on your system.

Motivation

We've created this hook after we had, yet again, to rewrite history by removing the professional email from public github commits.

Install

git clone https://github.com/kintoandar/git-hooks.git
cd git-hooks
mkdir -p ~/.git-templates/hooks
git config --global init.templatedir '~/.git-templates'
ln -s $(pwd)/pre-commit/github_email_verify.sh ~/.git-templates/hooks/pre-commit

Optional

In order to have your github's email account as the default email to be used, add the following line to your shell startup file (~/.bashrc, ~/.zshrc, etc).

export PRE_COMMIT_GITHUB_EMAIL='[email protected]'

Demo

It can save your bacon!

demo

Contributors

Made with ♥️ by:

About

github_email_verify: Avoid committing to github with your corporate email

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages