Mailing List Archive


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

Re: [tlug] About git revert without commit



Shmuel,

git diff compares the tree of a commit in the repository with (a) another tree in the repo, or (b) the current index of files recorded, or (c) the actual contents of the workspace, or (d) the working directory with the index.  IIRC (d) is the default with no commits specified at invocation.  git revert -n will leave you in a state where the working tree and the index are synchronized, so the result of "git diff" will be empty.

On Tue, Mar 13, 2012 at 7:31 PM, Shmuel Fomberg <shmuelfomberg@example.com> wrote:
Hi All.

A little git question: why when I revert a commit without creating a new commit, (using "git revert -n")
afterwards when I do "git diff", I don't see the reverted changes?
If there is no commit, they should have been seen as a diff, don't they?

If see the changes themselves in the files, btw, so the work was done...
Also, doing "git reset --hard" revert the revert. and that is OK.

I just want to know why the revery does not show in the diff...

Shmuel.

--
To unsubscribe from this mailing list,
please see the instructions at http://lists.tlug.jp/list.html

The TLUG mailing list is hosted by ASAHI Net, provider of mobile and
fixed broadband Internet services to individuals and corporations.
Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links