What does the double-dash [--] option do on git reset?

前端 未结 2 1633
故里飘歌
故里飘歌 2021-02-07 16:28

I\'ve seen commands like:

git reset e542 -- readme.txt

I understand this command puts in the index the contents of the file readme.txt from com

2条回答
  •  时光取名叫无心
    2021-02-07 16:30

    I believe it just separates the commit (which is an optional parameter) from the list of paths. If you didn't have the separator there'd be no sure fire way to distinguish if the first parameter was a path or a commit.

提交回复
热议问题