Resolve merge conflict and commit hooks in train()