git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Alf Clement <alf.clement@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git hooks to run something
Date: Tue, 24 Mar 2009 07:15:25 -0400	[thread overview]
Message-ID: <20090324111524.GA6291@coredump.intra.peff.net> (raw)
In-Reply-To: <556d90580903240356q3a72fd0bwa5ebe335914bc469@mail.gmail.com>

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

  reply	other threads:[~2009-03-24 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 10:56 git hooks to run something Alf Clement
2009-03-24 11:15 ` Jeff King [this message]
     [not found]   ` <556d90580903250333l496520ao5fde64fb08faf9ae@mail.gmail.com>
2009-03-25 11:25     ` Jeff King

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=20090324111524.GA6291@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=alf.clement@gmail.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).