Re: [RFC] Removing deleted files after checkout
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Aug 23, 2005, 19:43 UTC
- Message-ID
- <Pine.LNX.4.63.0508231533570.23242@iabervon.org>
- In-Reply-To
- <20050823162156.GA32240@hpsvcnb.fc.hp.com>
On Tue, 23 Aug 2005, Carl Baldwin wrote:
Show 15 quoted lines
> Hello, > > I recently started using git to revision control the source for my > web-page. I wrote a post-update hook to checkout the files when I push > to the 'live' repository. > > In this particular context I decided that it was important to me to remove > deleted files after checking out the new HEAD. I accomplished this by running > git-ls-files before and after the checkout. > > Is there a better way? Could there be some way built into git to easily > find out what files dissappear when replacing the current index with one > from a new tree? Is there already? The behavior of git should NOT > change to delete these files but I would argue that some way should > exist to query what files disappeared if removing them is desired.
If you don't use -f, git-checkout-script removes deleted files. Using -f tells it to ignore the old index, which means that it can't tell the difference between removed files and files that weren't tracked at all.
-Daniel *This .sig left intentionally blank*