* git hooks to run something @ 2009-03-24 10:56 Alf Clement 2009-03-24 11:15 ` Jeff King 0 siblings, 1 reply; 3+ messages in thread From: Alf Clement @ 2009-03-24 10:56 UTC (permalink / raw) To: git Hi all, when I switch between branches, I would like like to delete some object files and prepare some setup files. I there a good way to do this automatically when I run "git checkout branch", like misusing a hook to run a make in a special directory? All would happen in my local repository. Thanks, Alf ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git hooks to run something 2009-03-24 10:56 git hooks to run something Alf Clement @ 2009-03-24 11:15 ` Jeff King [not found] ` <556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Jeff King @ 2009-03-24 11:15 UTC (permalink / raw) To: Alf Clement; +Cc: git On Tue, Mar 24, 2009 at 11:56:05AM +0100, Alf Clement wrote: > when I switch between branches, I would like like to delete some > object files and prepare some setup files. > I there a good way to do this automatically when I run "git checkout > branch", like > misusing a hook to run a make in a special directory? > All would happen in my local repository. There is a post-checkout hook; see "git help hooks" for details. You could also make an alias; see the documentation for "alias.*" in "git help config". -Peff ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com>]
* Re: git hooks to run something [not found] ` <556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com> @ 2009-03-25 11:25 ` Jeff King 0 siblings, 0 replies; 3+ messages in thread From: Jeff King @ 2009-03-25 11:25 UTC (permalink / raw) To: Alf Clement; +Cc: git [re-adding git@vger to cc; please keep questions on-list so that others can also help to answer] On Wed, Mar 25, 2009 at 11:33:39AM +0100, Alf Clement wrote: > is there a way to push a modified hook script with the repository when > I push it to a server? > And how to get it with pull? No; for security reasons, no code (including hooks) from remote repositories is automatically run. The usual method is to include the hook in your repository and copy it into place after cloning. -Peff ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-25 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 10:56 git hooks to run something Alf Clement
2009-03-24 11:15 ` Jeff King
[not found] ` <556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com>
2009-03-25 11:25 ` Jeff King
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).