From: bill lam <cbill.lam@gmail.com>
To: git <git@vger.kernel.org>
Subject: git pull and GIT_DIR
Date: Wed, 2 May 2012 22:25:36 +0800 [thread overview]
Message-ID: <20120502142536.GA2609@debian.b2j> (raw)
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
next reply other threads:[~2012-05-02 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 14:25 bill lam [this message]
2012-05-02 19:11 ` git pull and GIT_DIR Junio C Hamano
2012-05-02 23:21 ` bill lam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120502142536.GA2609@debian.b2j \
--to=cbill.lam@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).