From: Jakub Narebski <jnareb@gmail.com>
To: Marlene Cote <Marlene_Cote@affirmednetworks.com>
Cc: git@vger.kernel.org
Subject: Re: help for a git newbie please
Date: Wed, 29 Dec 2010 10:58:11 -0800 (PST) [thread overview]
Message-ID: <m3k4iscsq2.fsf@localhost.localdomain> (raw)
In-Reply-To: <20053D7ED46E664F8B9A4D5E5B31937407197534@MBX021-W4-CA-1.exch021.domain.local>
Marlene Cote <Marlene_Cote@affirmednetworks.com> 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
next prev parent reply other threads:[~2010-12-29 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 17:43 help for a git newbie please Marlene Cote
2010-12-29 18:58 ` Jakub Narebski [this message]
2010-12-29 19:17 ` shared hooks (Re: help for a git newbie please) Jonathan Nieder
2010-12-29 19:26 ` help for a git newbie please - git hooks Marlene Cote
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k4iscsq2.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=Marlene_Cote@affirmednetworks.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).