Re: I don't want the .git directory next to my code.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: I don't want the .git directory next to my code.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:05

Johannes Schindelin [off-list ref] writes:
quoted
Yes, so you can use

$ git --work-tree . --git-dir /some/other/place <some-command>

But it's far from the user-friendlyness of a real lightweight checkout: 
you need to provide the --work-tree and --git-dir options each time you 
run git. And making an alias or using the environment variables are not 
really an option if you have more than one repository or working tree to 
deal with.
Well, the OP said he did not want _any_ file in the worktree.  So there's 
no way around specifying by hand everytime where the git directory should 
be.
Export GIT_DIR and GIT_WORKTREE and you are free to go, right?

Re: I don't want the .git directory next to my code.

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:05

Hi,

On Wed, 16 Jan 2008, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
Yes, so you can use

$ git --work-tree . --git-dir /some/other/place <some-command>

But it's far from the user-friendlyness of a real lightweight 
checkout: you need to provide the --work-tree and --git-dir options 
each time you run git. And making an alias or using the environment 
variables are not really an option if you have more than one 
repository or working tree to deal with.
Well, the OP said he did not want _any_ file in the worktree.  So 
there's no way around specifying by hand everytime where the git 
directory should be.
Export GIT_DIR and GIT_WORKTREE and you are free to go, right?
Yep.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help