From: "Frédéric Heitzmann" <frederic.heitzmann@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Need to set GIT_WORK_TREE when setting GIT_DIR !?
Date: Sun, 11 Mar 2012 22:13:52 +0100 [thread overview]
Message-ID: <4F5D1590.9050306@gmail.com> (raw)
In-Reply-To: <CALeToSV6xx=Vfw8gRbmeKWDzcHFaYvgFhMqx5cwtCYKdASJptw@mail.gmail.com>
Hi all,
My initial mistake was that I unintenionnaly created a bare repo (which
is really not what I want to do).
If I change that - GIt_DIR=.gita git init --no-bare - everything runs fine.
Lessons learned :
1/ the kind of repo - bare or not bare - that git init creates depends
on GIT_DIR.
This _is_ documented - I should have read more carefully - but it is
surprising for someone not aware of the history of GIT_DIR,
GIT_WORK_TREE, and so on.
Don't know if it 's worth changing this semantic though.
I let more experienced git hackers decide on this.
2/ Calling a git command that needs a working tree (add, status, commit,
...) in a bare repo should probably trigger a more explicit message.
Using the current directory if GIT_WORK_TREE is not set would actually
hide a potential configuration problem.
Thanks for your help,
--
Fred
next prev parent reply other threads:[~2012-03-11 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 22:51 Need to set GIT_WORK_TREE when setting GIT_DIR !? Frédéric Heitzmann
2012-03-09 23:06 ` Junio C Hamano
2012-03-10 13:23 ` Frédéric Heitzmann
2012-03-10 14:05 ` Nguyen Thai Ngoc Duy
2012-03-10 21:20 ` Junio C Hamano
[not found] ` <CALeToSVPWPwJTYxRgy0BW4TBfBJrb+LXC+QJDWjceQ=4f2_tRw@mail.gmail.com>
[not found] ` <CALeToSV6xx=Vfw8gRbmeKWDzcHFaYvgFhMqx5cwtCYKdASJptw@mail.gmail.com>
2012-03-11 21:13 ` Frédéric Heitzmann [this message]
2012-03-10 14:11 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5D1590.9050306@gmail.com \
--to=frederic.heitzmann@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.