From: Junio C Hamano Date: Sat, 13 Feb 2010 00:47:29 GMT Subject: Re: Individual file snapshots Message-ID: <7v6362c672.fsf@alter.siamese.dyndns.org> In-Reply-To: Mark Lodato writes: > 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_FILE and 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.