How does adding files to .gitignore affect existing tracked files in Git?
- Tracked files are immediately untracked and removed from the repository.
- Tracked files remain, but changes to them are no longer tracked.
- Tracked files are ignored only for the current commit.
- Tracked files are deleted from the working directory, but not the repository.
When files are added to .gitignore, it only affects untracked files. Existing tracked files remain in the repository, and their changes are still tracked unless committed before the addition to .gitignore.
Loading...
Related Quiz
- A development team is working on a feature that will take several weeks to complete. Which Git workflow model would best support their needs for isolation and regular integration?
- How can you view the changes introduced in a specific commit using Git?
- To handle large files during a Git transition, the use of git _______ can be a solution.
- A team member needs to review changes made in the past two weeks, but there are too many commits to check individually. What Git command should they use?
- In Git, what is the result of executing a 'merge' command?