A few days ago I started studying Git. I understood everything quite well, although I have some doubts about how to delete files.
Precisely, what I want to know is how I delete a file / directory with the command " rm
" of linux and that this action is not only reflected in the index ( stage
), but also in the local repository and in the remote repository.
I understand that if I delete a file / directory and follow it with the command "git add", this change will be reflected in the index ( stage
), but not in the local repository ( git commit
) or in the remote repository ( git push
). However, when I delete a file with the " rm
" command in linux and add it to the index (stage) and then execute the " git commit
" and " git push
" commands, the deleted files also disappear from the local repository and the remote repository.
Is it necessary to use the " rm
" command from Git or can I use the " rm
" command of linux (more comfortable for me) and reflect in some way such an action, not only in the index ( stage
), but also in the local repository and in the remote repository?
Thank you.