refactor and added git_ahead_count