Re: Need to set GIT_WORK_TREE when setting GIT_DIR !?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Frédéric Heitzmann wrote:

> export GIT_DIR=$PWD/.gita &&
> git init

This is where the recipe goes wrong.  It creates a bare repository.
Using vi or "git config" to edit its configuration to set the "[core]
bare" setting to false would change that.

The git-config(1) manpage says:

	By default a repository that ends in "/.git" is assumed to be
	not bare (bare = false), while all other repositories are
	assumed to be bare (bare = true).

and the logic in builtin/init-db.c seems to agree.

Maybe there is a better place to document this.  Improvements
welcome.

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]