git delete remote file code example
Example 1: delete file from a branch git
git rm --cached file1.txt
git commit -m "remove file1.txt"
Example 2: git delete remote name
git remote rm remote_name
Example 3: git remove remote file keep local
# for single file
git rm --cached myfile
# for directory file
git rm --cached --r myfile
Example 4: delete file from a branch git
git rm file1.txt
git commit -m "remove file1.txt"