I am trying squash many commits into a single one, the problem is that I need do that by author (name or email).
The case:
Lets say I have a branch called fe
With Kenkron's caveats in mind, you could do a:
SORTED_GIT_LOGS=$(git log --pretty="format:%an %H" master..feature_a | sort -g | cut -d' ' -f2); \
IFS=$(echo -en "\n\b"); for LOG in $SORTED_GIT_LOGS; do \
git cherry-pick $LOG; \
done | less
The git log --pretty="format:%an %H" master..feature_a | sort -g would sort the logs of the feature_a commits (not the ones from master because of the master..feature_a syntax)
You would still need to do an interactive rebase to squash the (now ordered by author) commits on master.