Friday, September 27, 2019

How to get git commit id from commit count



#repo folder,31 is the commit count
git log --oneline > 1.txt
tail -r 1.txt
tac 1.txt > 2.txt
sed '31!d' 2.txt

No comments:

Post a Comment