Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
443 views
in Technique[技术] by (71.8m points)

dot sign's meaning in git checkout command

if I use git command like this:

git checkout -- .

I know its effect is to discard all unstaged files everywhere.

Can anyone tell me what is the meaning of the dot sign (.) in this command?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The dot stands for the current directory. The command you've mentioned means: Do a git checkout of the current directory (recursively). The double-dashes separate options from filespecs (like .).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...