What is the proper way to delete a file from Git in these cases?
Case 1: I created a new file, but I haven’t done git add new_file.html
Solution: I can just delete new_file.html from my computer.
Case 2: I created a new file, I have done git add new_file.html, but I have not committed these changes.
Solution: ?
Case 3: I created a new file, I have done git add new_file.html, I have done git commit -m 'added a new file here!'.
Solution: ?
Case 4: I created a new file, I have done git add new_file.html, I have done git commit -m 'added a new file here!', and I have merged this branch with master branch.
Solution: ?
For case 2
For case 3
For case 4, just revert the commit