Skip to content

Given diff-tree example in Git Subtree Merging article does not seem to work. #571

Description

@tswast

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?

Activity

  1. tswast commented on Mar 18, 2016

    @tswast
    Author
  2. YueLinHo commented on Mar 18, 2016

    @YueLinHo
    Contributor

    The published link you provided is Pro Git v1. Here is Pro Git v2 - 7.8 Advanced Merging .

  3. athrunsun commented on Dec 6, 2017

    @athrunsun

    @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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions