RE: help for a git newbie please - git hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub,
 Thank-you for your reply and your advice about the subject.  I apologize for the vagueness of the previous one.

I see the templates directory now.  Thanks again.

--------------------------
Regards,
Marlene Cote
Affirmed Networks
978-268-0821 



->-----Original Message-----
->From: Jakub Narebski [mailto:jnareb@xxxxxxxxx]
->Sent: Wednesday, December 29, 2010 1:58 PM
->To: Marlene Cote
->Cc: git@xxxxxxxxxxxxxxx
->Subject: Re: help for a git newbie please
->
->Marlene Cote <Marlene_Cote@xxxxxxxxxxxxxxxxxxxx> writes:
->
->> I don't understand the docs when they talk about hooks.  I have
->> tried making my .git/hooks samples executable and they don't have
->> any suffix to remove, so they should just run.  However, every time
->> I make a new clone, the changes I made to the hooks are gone.  Just
->> the samples get put into the clone again.  How do I put a hook in
->> place that every developer will get and execute?  If I should be
->> using server side hooks, where exactly would those go?  Should I
->> modify the hooks under my repositories directory?
->
->First, for the future, could you please use more specific subject?
->"Help for a git newbie please" doesn't tell us _anything_ about what
->problem do you have with git on first glance.
->
->Second, hooks are not versioned and not under version control.  They
->are not transferred on clone either.  There are reasons for that,
->including the safety (running code under control of other side), and
->the fact that hooks are usually configured to local needs, so they
->might not make sense for other people.
->
->
->Now, if you either use some kind of networked filesystem, or you can
->configure it so each developers machine has the same install, you can
->make use of git templates mechanism.  This is the way git includes
->sample hooks in newly created repositories (git init, git clone, or
->even IIRC "git init" on existing repository).
->
->Those template files are by default (on Linux) installed in
->/usr/share/git-core/templates.  So what you can do is to put hooks you
->want each developer to have (either as executable hook, or as hook
->sample) in /usr/share/git-core/templates/hooks/ directory (or its
->equivalent in your installation).
->
->I hope that helps.
->
->--
->Jakub Narebski
->Poland
->ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]