Search code examples
gitgit-cola

Starting git-cola in branch view


The majority of times I start git-cola I go through the sequence BranchVisualize Current Branch... (or Visualize All Branches...).

Is there a way to directly launch one of those views from the command line?

$ git-cola --version
cola version 2.5

Solution

  • Well, incidentally I found this answer to an unrelated question, where I discovered git-cola adds a cola module to git (git cola ..., git help cola). Then I checked through git help cola but didn't see what I was looking for.

    But then I noticed the viewer had gitk at the end of the title bar.

    So I just typed gitk on the command line and it worked. Not too experienced with git and related tools, so I didn't know that existed.

    So to answer my initial question more specifically (at least for Git Cola 2.5):

    • Branch → Visualize Current Branch...: gitk
    • Branch → Visualize All Branches...: gitk --all
    • Bonus: Visualize a specific other branch: gitk <branchname>
    • Bonus: View → DAG...: git dag

    I do not know if gitk came with git-cola, or if it's its own thing, or really how I got it. Same deal with the DAG tool.