I have, due to various previous issues, renames, server changes, Xcode mishandling, etc, rewritten the history of my branch(es) using the technique described here.
However, one of my colleagues has uncommitted work from a branch that is currently not very compatible with the one the other people use. What I'd like is to be able to grab all the commits he's done from a trusted date and pull them in the correct branch(to save history)
I can show a log of my colleague's work using this solution, which would allow me, in the worst case, to grab manually every change and cherry pick the correct source from the latest version, knowing every change he made.
Can I actually filter from a given commit, since I know the hash of the commit he made when he started to work on the functionality we don't want to lose?
In order to see what I'm doing, I've added a prettifying option --pretty=format:"%H - %ad : %s"
.
I know there are tools, such as --since and --until, but when I do git log --author="colleagueLogin" --pretty=format:"%H - %ad : %s" --since commitHash
, I get all his commits ever, so obviously, I'm doing it wrong.
Thanks to Twalberg's help, I understood I could skip the "making a clean log" step, and integrate the commits (which I now have clearly listed) by applying human intelligence to the list I have, e.g. start the cherry-picking process on the correct date. However, for the sake of knowledge, I'd still love to learn how to cut off git log --author="colleagueLogin" --pretty=format:"%H - %ad : %s"
from the commit date I know he started the feature he worked on...