Git Ignore
Ignore files but not a specific file inside a directory
Ignore everything under "directory" | directory/* |
But don't ignore "another_directory" | !directory/another_directory |
But ignore everything under "another_directory" | directory/another_directory/* |
But don't ignore "file_to_be_staged.txt" | !directory/another_directory/file_to_be_staged.txt |
Revert Uncommitted Changes
Revert everthing | git restore . |
Revert specific file | git restore FILEPATH/FILENAME |