Fix bash's errors upon git checkout older commit.