webdevask.com

Menu

  • Home
  • New
  • Add question

git branch - Git find the head commit of all branches

View Original

one text

Solution:

The plumbing tool for refs is

git for-each-ref --format='%(refname:short) %(objectname:short)' refs/heads

for the exact output you wanted.


Also worth noting, git branch -v (or -vv for even slightly more verbose) will list all branches with the commit hash their tip points to, but in a much verbose way, since it also features info about remote branches association / last commit message.

Example output of a branch with -v :

development    f06f99b5c4 [behind 1] <commit message of commit f06f99b5c4>

Example output of a branch with -vv :

development    f06f99b5c4 [origin/development: behind 1] <commit message of commit f06f99b5c4>

Source

See also:

  • php สร้าง Google ชีตจากบัญชีบริการ

  • php - Laravel 8.0 Installation Failed

  • javascript - How to include HTML data (tags) as value in "arrayToDataTable" of Google Pie Chart?

  • how to Grouping array in php

  • php - vender folder from my laravel project has more 1k error

© 2021
E-mail: contact@webdevask.com
Back to top