Suppose I have a folder data/ with some txt files I want to monitor for changes. I want to run a script and find out what has changed since last commit.
Here is the workflow I have in mind:
Make changes: add, modify or remove files
Stage all the files
git add data/List all the changes
git diff --name-only --staged
This should account for three cases:
- New file added should be listed
- Modified files should be listed.
- Deleted files should not be listed.
I need a command to specifically tell me which file since last commited was deleted. So that I can do some stuff in my script before doing a git rm deleted_file.txt