capture hash value from git log –oneline –graph using regex When running git log --oneline --graph you can get something like this