git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git pull and GIT_DIR
@ 2012-05-02 14:25 bill lam
  2012-05-02 19:11 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: bill lam @ 2012-05-02 14:25 UTC (permalink / raw)
  To: git

It appeared that

a)
cd /path/to && git pull git/https://....

will fetch and checkout latest changes to working tree.  This is as
expected.  On the contrary

b)
GIT_DIR=/path/to/.git git pull git/https://....

will only update git repo, but leaving working tree untouched.
Subsequent git status and git diff will indicate unstaged changes, 
apparently a commit that will revert the updated git repo. I have to
do 'git reset --hard' to really update the working three.

I'm not sure if this is an intended behavior or I missed something. 

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-02 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-02 14:25 git pull and GIT_DIR bill lam
2012-05-02 19:11 ` Junio C Hamano
2012-05-02 23:21   ` bill lam

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