Re: Individual file snapshots
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 13, 2010, 00:47 UTC
- Message-ID
- <7v6362c672.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <ca433831002121633j5b96049bs71e539c96397aff4@mail.gmail.com>
Mark Lodato <lodatom@gmail.com> writes:
Show 7 quoted lines
> The basic steps are: > > backup .git/index > git add -a > git write-tree > git commit-tree > restore .git/index
Instead of doing that, you might want to consider
GIT_INDEX_FILE=...some-temporary-file...
export GIT_INDEX_FILEand run everything as if that is the index throughout your script. That way, if your script ever failed in the middle, you won't have to worry about a broken index file.