From: Junio C Hamano Date: Mon, 25 Mar 2013 22:20:16 GMT Subject: Re: git ate my home directory :-( Message-ID: <7v38vjw28v.fsf@alter.siamese.dyndns.org> In-Reply-To: <5150CB34.1030008@nod.at> Richard Weinberger writes: > Okay, I have to set GIT_DIR _and_ GIT_WORK_TREE to make my scripts safe again? > I've always set only GIT_DIR because it just worked (till today...). That means you never run your script inside a subdirectory ;-) If your $GIT_DIR is tied to a single working tree, a simpler way would be to add [core] worktree = /path/to/the/work/tree/ to $GIT_DIR/config.