GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - beldmit/git-commit-dag: git plugin to visualize a dependency tree between commits in a specified range

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
git-commit-dag.1
git-commit-dag.1
 
 

Repository files navigation

git-commit-dag

Analyze which commits in a range can be safely reordered without conflicts.

Given a range of commits, git-commit-dag uses patch commutation to build a dependency DAG — showing which commits must come before which others, and which are independent.

Usage

git commit-dag <base>..<last> [--svg] [--context N] [--show-files] [--whole-file]
git commit-dag <base> <last>  [--svg] [--context N] [--show-files] [--whole-file]
git commit-dag --explain <commit1> <commit2> [--context N] [--whole-file]

The range follows standard git conventions: base is excluded, last is included (same as git log base..last).

Option Description
--explain Show conflicting hunks between two specific commits
--svg Output as SVG
--context N Expand hunks by N context lines (default 0; git apply uses 3)
--show-files Show which files cause each dependency
--whole-file Treat any two commits touching the same file as dependent

Example

$ git commit-dag HEAD~4 HEAD
○ d11afa9 A: modify line1 of file1
│ ○ cc006b8 C: modify file2
│ │
○ │ 03487f3 B: modify line1 of file1 again
├─┘
○   0a7d408 D: modify both files

411e44d E: update README  (independent)

Use --explain to see why two commits depend on each other:

$ git commit-dag --explain abc1234 def5678
abc1234 Fix login validation
def5678 Add rate limiting

auth.rs:
  [abc1234] @@ -42,1 +42,1 @@
  -old_check()
  +new_check()
  [def5678] @@ -43,0 +43,2 @@
  +rate_limit()
  +log_attempt()

Use --svg for graphical output:

git commit-dag HEAD~10 HEAD --svg > deps.svg

Building

cargo build --release
cp target/release/git-commit-dag ~/.local/bin/

Limitations

  • Textual analysis only — semantically dependent commits that touch different lines won't be detected.
  • Binary files, renames, and submodules are not analyzed.
  • Uses zero context lines by default, which is slightly more permissive than git apply. Use --context 3 to match git's default.

License

BSD-3-Clause. Patch commutation algorithm vendored from git-absorb.

About

git plugin to visualize a dependency tree between commits in a specified range

Resources

Readme
BSD-3-Clause license
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.