From: Jeff King Date: Tue, 24 Mar 2009 11:15:25 GMT Subject: Re: git hooks to run something Message-ID: <20090324111524.GA6291@coredump.intra.peff.net> 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