179k views
2 votes
Files that are already tracked by Git ___ be affected; if they are later added to the ___, the file ___ continue to be updated.

A. Will, Ignore Rule, will not
B. Will not, Snapshot, will
C. Should, Deployment, should not
D. Should not, Configuration, should

User Kervens
by
8.0k points

1 Answer

6 votes

Final answer:

In the context of Git, once a file is being tracked, adding it to the .gitignore file does not affect its tracking status. Instead, the command `git rm --cached` must be used to stop tracking the file.

Step-by-step explanation:

The subject of the question is about Git version control and particularly the use of .gitignore file. The correct answer is: Files that are already tracked by Git will not be affected; if they are later added to the .gitignore, the file will continue to be updated in the repository. As such, this means that the choice A. Will, Ignore Rule, will not is the correct sequence to fill in the blanks. Once Git is tracking a file, adding that file to .gitignore will not stop Git from tracking it. To stop tracking a file that is already being tracked, one must explicitly remove it from the index using the git rm --cached command.

User Juffy
by
8.0k points