From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Liu Yubao" <yubao.liu@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to revert changes in working tree?
Date: Wed, 6 Dec 2006 11:20:24 +0100 [thread overview]
Message-ID: <81b0412b0612060220n11fb7e19hc6ed202759962bd3@mail.gmail.com> (raw)
In-Reply-To: <45769417.70601@gmail.com>
On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> Alex Riesen wrote:
> > On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> >> I'm confused how to revert changes in working tree:
> >>
> >> $ git fetch
> >> $ git merge "sync with origin" HEAD origin
> >> ....conflict....
> >
> > You may want to consider git pull. It'd do exactly the same
>
> It's said somewhere "git pull" has strange behaviour and fetch+pull
> is recommended.
So why do you use fetch+merge?
> sorry, I made a mistake, that should come from "git merge",
so, you just have an unresolved merge.
It was discussed on this mailing list very recently
(and actually is being discussed), so just look at
the archives.
> > They problem is the exec-bit which windows does not
> > have and cygwin failed to correctly workaround the
> > limitation.
> >
> > Do a "git repo-config core.filemode false" to almost
> > disable the checks for exec bit.
> >
>
> It has been set. I guess the cause is a interrupted merge
> operation that leads to textual difference.
yes, though what I can't understand is why don't you have
unmerged entries... Maybe it comes from playing with
all these commands you mentioned in the original mail.
> After run "git reset --hard", all deleted files come back, but I reach
> the old state:
> $ git status
When? Immediately after git reset --hard? Then you very
likely have no permission to write (or lost it somehow) into
the working directory, otherwise I don't see could this be
possible. git reset --hard rewrites everything.
> HEAD: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
> master: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
> origin: commit ff51a98799931256b555446b2f5675db08de6229
> "git diff --cached" shows nothing;
which is correct.
> "git diff" shows many diffs:
and this is not. You do have changes, which could not be reset.
I fail to see why. Are you sure you haven't accidentally repeated
the merge after doing git reset --hard? And what was _exactly_
next prev parent reply other threads:[~2006-12-06 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 6:49 how to revert changes in working tree? Liu Yubao
2006-12-06 8:43 ` Alex Riesen
2006-12-06 9:57 ` Liu Yubao
2006-12-06 10:20 ` Alex Riesen [this message]
2006-12-06 11:14 ` Liu Yubao
2006-12-06 12:30 ` Alex Riesen
2006-12-06 12:52 ` Jakub Narebski
2006-12-06 18:13 ` Shawn Pearce
2006-12-07 1:42 ` Liu Yubao
2006-12-07 7:15 ` Juergen Ruehle
2006-12-06 10:20 ` Jakub Narebski
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=81b0412b0612060220n11fb7e19hc6ed202759962bd3@mail.gmail.com \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=yubao.liu@gmail.com \
/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).