fix bug,use option --git-dir in conjunction with --work-tree