git pull and GIT_DIR

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

 



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
--
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]