Walk the node tree and record the parents, then reverse the tree so we can have the exact order in which to create git commits