Move head fetching to command executation
Add git struct