[SOLVED] (was: git log --graph with a sort of local revision number)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> "UB" == Uwe Brauer <oub@xxxxxxxxxx> writes:

>>> "RA" == Rafael Ascensão <rafa.almas@xxxxxxxxx> writes:
   >> You can achieve something close (on small repos, more on that later) with:
   >> $ git log --graph --color \
   >> --format='%C(auto)changeset: %h:%H%nuser:      %an%ndate:      %ad%nsummary:   %s%n' \
   >> | git name-rev --refs=$(git rev-parse --abbrev-ref HEAD) --name-only --stdin

The script to generate a test repo is
git init
echo "First" > test.org
git add test.org
git add create.sh
git commit -a -m "First commit"
git checkout master   
echo "Second" >> test.org
git commit -a -m "Second"
echo "Third" >> test.org
git commit -a -m "Third"
echo "Forth" >> test.org
git commit  -a -m "Fourth"
echo "Fifth" >> test.org
git commit  -a -m "Fifth"
echo "Six" >> test.org
git commit  -a -m "Six"

Then your command even in a short shell script
#!/bin/bash
 git log --graph --color --format='%C(auto)changeset: %h:%H%nuser:      %an%ndate:      %ad%nsummary:   %s%n'   | git name-rev --refs=$(git rev-parse --abbrev-ref HEAD) --name-only --stdin | more


Works as you described.

Thanks

Uwe Brauer 




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux