I have created a file a gave it the name --
. How can I add it to the git repository?
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
--
nothing added to commit but untracked files present (use "git add" to track)
I know that I could do git add .
, but I don't want to. I want to know how to specifically add this file, named --
.
I tried:
$ git add --
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
$ git add "--"
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
$ git add '"--"'
fatal: pathspec '"--"' did not match any files
$ git add \-\-
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
So, how to add a file named --
to prepare it for commit?