I have several modified files, my git status
looks like
$ git status
On branch loyalty-module
Your branch is up-to-date with 'origin/loyalty-module'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: this/is/a/path/to/AFile.php
modified: this/is/another/file/A.php
modified: this/is/another/file/B.php
Untracked files:
(use "git add <file>..." to include in what will be committed)
system/logs/test.log
system/logs/test-api.log
no changes added to commit (use "git add" and/or "git commit -a")
Accidentally, I run this command git checkout . this/is/a/path/to/AFile.php
. Notice the period!
When, I run the git status
again, all I've got is the Untracked files.
$ git status
On branch loyalty-module
Your branch is up-to-date with 'origin/loyalty-module'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
system/logs/test.log
system/logs/test-api.log
no changes added to commit (use "git add" and/or "git commit -a")
What does git checkout .
do? And how can I retrieve those modified
files again?