git reset <file> versus git reset -- <file> -


i need add several files group them single commit, have exclude 1 of them. in this answer, code given is:

git add -u git reset -- file_to_ignore.dat 

i'm not sure dashes in last command. difference following?

git reset file_to_ignore.dat 

which how it's shown in this tutorial.

i mentioned double hyphen (or double dash) notation in "deleting badly named git branch".

it helps separating options of commands actual arguments (filename)

it conventional recognize double hyphen signal stop option interpretation , treat following arguments literally.

in case, there no difference... unless file name 'master'! (in case, -- important)


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -