How to read following git branch -vv?
git branch -vv?
breakfix/testing-scripts 3d2c46f ALL 8 TESTS ARE WORKING
feature/core 2c182f7 CLEAN-WORKING
feature/docker fa84711 refactor variables in progress_bar function
feature/fix-set-e 7b05f0d Merge pull request 'feature/docker' (#2) from feature/docker into main
feature/show-all-sources 7b05f0d Merge pull request 'feature/docker' (#2) from feature/docker into main
* main 477e895 Merge pull request 'ALL 8 TESTS ARE WORKING' (#3) from breakfix/testing-scripts into main
~/work/myBASH/devops-bash-lib (main*) » git log --oneline --graph --dot --decorate main feature/fix-set-e 128 ↵ frank@kubemaster
fatal: unrecognized argument: --dot
--dot does not work??
Does this align with git branch -vv?
~/work/myBASH/devops-bash-lib (main*) » git log --oneline --graph --decorate main feature/fix-set-e frank@kubemaster
* 477e895 (HEAD -> main, tag: v0.0.3, origin/main) Merge pull request 'ALL 8 TESTS ARE WORKING' (#3) from breakfix/testing-scripts into main
|\
| * 3d2c46f (origin/breakfix/testing-scripts, breakfix/testing-scripts) ALL 8 TESTS ARE WORKING
|/
* 7b05f0d (tag: v0.0.2, feature/show-all-sources, feature/fix-set-e) Merge pull request 'feature/docker' (#2) from feature/docker into main
|\
| * fa84711 (origin/feature/docker, feature/docker) refactor variables in progress_bar function
| * 27d76f9 Working with all commented out trys
| * d268d8b Added Poor Man's DEBUG_TIMERS
| * c75ef7b Added docker functions from docker-prune-review.sh
| * 38bff06 Added header function from docker-prune-review
|/
* 804f04f (tag: v0.01) Merge pull request 'feature/core' (#1) from feature/core into main
|\
| * 2c182f7 (origin/feature/core, feature/core) CLEAN-WORKING
| * dc43d53 Updated README.md
|/
* dc62cb8 Initial
~
This output is a “snapshot” of where each local branch pointer is currently sitting.
* main: The asterisk means this is your current branch. It’s at477e895.- Identical Hashes: Notice that
feature/fix-set-eandfeature/show-all-sourcesboth point to7b05f0d. This means these two branches are identical right now. - Merged Status: Because
mainis at477e895and7b05f0d(the fix-set-e branch) appears lower down in your log history,feature/fix-set-eis fully merged.
2. Analyzing the Log Graph
Your git log --graph provides the “family tree” that explains the branch -vv output.
Breaking down the visual:
- The Latest Merge (
main):The top commit (477e895) showsmainmergedbreakfix/testing-scripts. You can see the lines branch out to3d2c46fand come back together. - The “Middle” State (
feature/fix-set-e):Look at commit7b05f0d. You see the labels(feature/show-all-sources, feature/fix-set-e)right next to it.- This commit is a Merge Commit.
- It merged
feature/dockerintomain(at that time). - Since
mainhas moved past this commit to477e895, these feature branches are now “ancestors” ofmain.
3. Does it align?
Yes, perfectly.
- In
branch -vv,feature/fix-set-ewas at7b05f0d. - In
git log,7b05f0dis a commit that exists directly in the history ofmain. - The Verdict:
feature/fix-set-ehas been merged and is safe to delete.
Summary Table: Branch Status
| Branch | Commit | Status |
main | 477e895 | Up to date (includes everything below it). |
breakfix/testing-scripts | 3d2c46f | Merged into main at 477e895. |
feature/fix-set-e | 7b05f0d | Merged into main (it is an older version of main). |
feature/docker | fa84711 | Merged into main at 7b05f0d. |
4. Why did --dot fail?
In git log, there is no --dot flag. You might have been thinking of:
--all: To show all branches, not just the ones you named..: Used in file paths.- Graphviz/Dot: Sometimes people export git logs to
.dotfiles to render them as images, but that’s a separate utility.
