git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Oberndorfer <kumbayo84@arcor.de>
To: git@vger.kernel.org
Cc: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: git gui: adding bare remotes on local filesystem reports error
Date: Sun, 23 Oct 2011 18:14:59 +0200	[thread overview]
Message-ID: <2536790.zI3kRoQihV@soybean> (raw)

Hi,

i just tried using git gui to add a remote on the local file system
and push to it.
(set Location to /tmp/blah.git, select "Initialize Remote Repository and Push")

but git gui reported:
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)

I bisected the error to
a9fa11fe5bd5978bb175b3b5663f6477a345d428 git-gui: set GIT_DIR and GIT_WORK_TREE after setup

I guess it is necessary to unset the GIT_DIR and GIT_WORKTREE env vars before calling
git --git-dir=$location init --bare

On a side note i am wondering why it is necessary to call mkdir -p?
And why it is not using git init --bare <path>
During some tests it created all leading directories.

Thanks,
Greetings Peter

                 reply	other threads:[~2011-10-23 16:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2536790.zI3kRoQihV@soybean \
    --to=kumbayo84@arcor.de \
    --cc=git@vger.kernel.org \
    --cc=giuseppe.bilotta@gmail.com \
    --cc=spearce@spearce.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).