Re: how to revert changes in working tree?

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

 



On 12/6/06, Liu Yubao <yubao.liu@xxxxxxxxx> 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

$ git branch
* master
  origin

$ git status
# .....: needs update
# .....: needs update
(In fact I never modified anything in this tree, and "git diff"
showed many difference indeed, very strange).

That's windows and cygwin for you. They work together
and may someday even figure how to commit the changes.

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.

I tried "git update-index --refresh", "git reset --hard",
"git reset --hard master", "git checkout master",
"git checkout -f master", but "git status" still said same
as above.

After git update-index --refresh you shouldn't have had
the diffs (unless you actually had textual changes).

At last, I deleted all files that were reported to be updated
with "rm -rf", ran "git checkout master" and "git status", then
git reported:
#       deleted:    ....
#       deleted:    ....

Now do a git reset --hard and you should be set,
unless you're unlucky enough to work on FAT,
where probably nothing will save you.

And avoid using any "special" characters (8bit, utf/unicode)
in filenames, while you're on windows: you'll never be able
to share the repository (unless others agree to use your
rules for language and filesystem encoding).
-
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]