modify git diff and git rev-parse cmd