progit2
progit2 copied to clipboard
Given `diff-tree` example in Git Subtree Merging article does not seem to work.
This issue if for the subtree-merges.asc file published here.
I tried the command
git diff-tree -p rack_branch
and
git diff-tree -p rack_remote/master
but every time I ran them, I got no output after making changes. I got no output whether my change was a working copy, staged, or committed.
What did work for me was:
git diff-tree -p HEAD:rack/ rack_remote/master
or to diff against your local branch:
git diff-tree -p HEAD:rack/ rack_branch
I considered sending a PR to fix this, but maybe I missed something?
There's some discussion here about this page, as well: http://answers.candoerz.com/question/42994/git-diff-tree-showing-changedset-already-merged.aspx
The published link you provided is Pro Git v1. Here is Pro Git v2 - 7.8 Advanced Merging .
@tswast the discussion link is broken. Perhaps this is the original discussion: https://stackoverflow.com/questions/29901431/git-diff-tree-showing-changedset-already-merged
@YueLinHo v2 shows the same diff-tree notation. From what I can tell, the tree-ish id of the mapped subdirectory must also be specified as @tswast indicated.
@tswast I think an important note here is that, the changes must be committed to be seen in diff-tree output of the workable versions of commands you provided above. Am I correct?
Is there any way to compare working copy before committing them?