DEV Community

Discussion on: 10 Git Tricks to Save Your Time and Sanity

Collapse
 
jacobherrington profile image
Jacob Herrington (he/him)

It is kind of superfluous. It is just a more formal way to indicate that you are specifying the file name. I included it here in case someone took the example and made an alias out of it.

Imagine you had a file called master and you wanted to check that file out, git checkout master would probably do something different than you wanted, but git checkout -- master would check that file out from the current branch.