takes input from editor and checks if it's a valid git command