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

Use standard ~/.config/git location instead of ~/.git-templates one #14

Open
ssbarnea opened this issue Jan 22, 2017 · 3 comments
Open

Comments

@ssbarnea
Copy link

It think it would be much better to use ~/.config/git location instead of creating a new folder inside the user home directory, even if it is a hidden one.

That location is already prefered by git ignored, see https://git-scm.com/docs/gitignore

@tommarshall
Copy link
Owner

Hi @ssbarnea,

Thanks for raising this. I wasn't aware of the ~/.config/git directory.

Am I right in thinking you're proposing a changing the global installation instructions to the following?

mkdir -p ~/.config/git/hooks
git config --global init.templatedir '~/.config/git/hooks'
curl https://cdn.rawgit.com/tommarshall/git-good-commit/v0.6.1/hook.sh > ~/.config/git/hooks/commit-msg && chmod +x ~/.config/git/hooks/commit-msg

Tom

@ssbarnea
Copy link
Author

@tommarshall Before making any changes we should first do some testing. I am not sure if this works across all platforms and versions of git. I will do some testing and be back with my results.

@tommarshall
Copy link
Owner

tommarshall commented Jan 24, 2017

@ssbarnea sounds good.

Thinking about it, it would need to be ~/.config/git/templates/hooks rather than ~/.config/git/hooks.

Neither the githooks docs nor the git-init templatedir docs mention the ~/.config/git directory, so it doesn't appear to be an official Git standard for init.templatedir, but I do agree that it would be nicer to house the template dir within ~/.config/git, providing it's safe to do so.

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

No branches or pull requests

2 participants