fatal: ambiguous argument 'origin': unknown revision or path not in the working tree

后端 未结 6 2047
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 05:34

I used git diff origin often in the past.

In a different environment it does not work. I have no clue why.

user@host> git diff origin         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 06:21

    Sometimes things might be simpler. I came here with the exact issue and tried all the suggestions. But later found that the problem was just the local file path was different and I was on a different folder. :-)

    eg -

    ~/myproject/mygitrepo/app/$ git diff app/TestFile.txt

    should have been

    ~/myproject/mygitrepo/app/$ git diff TestFile.txt

提交回复
热议问题