Untuk menghapus File yang di Github atau GitLab bisa menggunakan perintah :
1 2 3 | git rm Namafile.txtgit commit -m "Menghapus File"git push origin master |
Untuk menghapus Folder yang di Github atau GitLab bisa menggunakan perintah :
1 2 3 | git rm -r NamaFoldergit commit -m "Menghapus Folder"git push origin master |
perintah diatas menghapus file yang di repository git, juga menghapus file yg ada di local repository.
Untuk menghapus file yang hanya ada di repository git, tanpa menghapus file yang ada di local repository
gunakan :
1 2 3 | git rm --cached NamaFile.txtgit commit -m "Hapus File "git push origin master |
Untuk menghapus Folder yang hanya ada di repository git, tanpa menghapus file yang ada di local repository
gunakan :
1 2 3 | git rm -r --cached NamaFoldergit commit -m "Hapus Folder "git push origin master |
EmoticonEmoticon