git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git gui: adding bare remotes on local filesystem reports error
@ 2011-10-23 16:14 Peter Oberndorfer
  0 siblings, 0 replies; only message in thread
From: Peter Oberndorfer @ 2011-10-23 16:14 UTC (permalink / raw)
  To: git; +Cc: Giuseppe Bilotta, Shawn O. Pearce

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-23 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-23 16:14 git gui: adding bare remotes on local filesystem reports error Peter Oberndorfer

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).