gitclearcaseversion-tree

How to get a version tree for a file in git?


In clearcase I could just run

branchlocation>cleartool vtree <filename>

And a version tree would pop up showing me the merges for that file. I want to do the equivalent in git.

I think it is something to do with git read-tree - but that doesn't look like what I'm looking for.

My question is: How to get a version tree for a file in git?


Solution

  • The gitk approach was mentioned in "Git Version Tree: Gitk"

    The problem with this command is that the output can easily become too large and complex to be easily readable.
    If that is the case, then you might want to run gitk on a single file to only see the changes on that file. For example:

    gitk --all FILENAME &
    

    The closest I have seen from a ClearCase version tree in Git is in "Viewing full version tree in git", which took:

    git log --oneline --graph --color --all --decorate
    

    And transformed it with crc8/GitVersionTree into:

    https://camo.githubusercontent.com/0cf835a38473b6caa9b39fe59a7088d3dcb70f09/68747470733a2f2f7261772e6769746875622e636f6d2f637263382f47697456657273696f6e547265652f6d61737465722f73616d706c655f6776742e706e67

    You also have graph tools which could help, mentioned in "How do I build a version tree for a Git repository using LibGit2(Sharp)"