Delete single file & folder from a Github repository
Sometimes we need to delete single file or folder in a git respository. This article shows how to do that.
Delete single file & folder from a Github repository
Sometimes we need to delete single file or folder in a git respository.
First of all, we use Git Bash in Windows (or Terminal in Linux, OSX).
Clone Repository
1
$ git clone https://xxxx/xxx/
Remove local file & folder
1
2
3
$ cd xxx/
$ git rm file.file #remove single file
$ git rm -r folder/ #remove folder
Commit
1
$ git commit -m "remove some files"
Push
1
$ git push origin xxxx #xxxx is your branch
This post is licensed under
CC BY 4.0
by the author.