Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:28:26+00:00 2026-05-13T08:28:26+00:00

Not sure if this is possible in git (I haven’t found it but I

  • 0

Not sure if this is possible in git (I haven’t found it but I may be using the wrong vocabulary in my searches), but it be would useful to be able to modify and enable hooks as the defaults for all new repositories (at the time of creation I mean) so these don’t have to be customized each time a new repository is created. It seems the easy way to do this is write a wrapper that sets my hooks and chmods them when I create a new repository, but if there’s a way built into git I would rather use that instead of having unnecessary wrapper scripts however little lying around.


Clarification copied up from a comment to a now-deleted answer:

My question is whether the default behavior for ALL new repositories can be changed, so they don’t need to be customized in the same way each time for each new repository. The easy answer is write a wrapper for creating and customizing the repos (it generates the hook scripts and chmods them), but it seems like this default behavior should also be customizable without having to do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:28:26+00:00Added an answer on May 13, 2026 at 8:28 am

    From the git-init man page (also works with git-clone if you are cloning an existing repo instead of creating a new one from scratch):

           --template=<template_directory>
               Provide the directory from which templates will be used. The
               default template directory is /usr/share/git-core/templates.
    
               When specified, <template_directory> is used as the source of the
               template files rather than the default. The template files include
               some directory structure, some suggested "exclude patterns", and
               copies of non-executing "hook" files. The suggested patterns and
               hook files are all modifiable and extensible.
    

    You can modify the system-wide template directory (which defaults to /usr/share/git-core/templates, but may be in a different location on your machine), you can supply --template=<template_directory> on the command line when you create or clone the repo, or you can configure the default template directory in your config file:

    [init]
         templatedir = /path/to/templates
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not entirely sure if this is possible, but does anyone know how, or
I'm not sure if this is even possible but here goes: Currently I have
I am pretty sure this is possible just not sure what is the term
Not sure if this is possible or if I'm expressing correctly what I'm looking
I'm not quite sure if this is possible, or falls into the category of
Not sure this is a programming question, but we use LaTeX for all our
Not sure if this is intended behavior or a bug or a wrong function
I´m not sure if this is really a programming question, but it's related to
I'm not sure if this is something I should do in T-SQL or not,
I'm not sure if this is a strange thing to do or not, or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.