Extracted methods to getPrefixes and git log commands