How to delete a folder in GitLab using the console

I incorrectly created a folder with a name srcin my GitLab repository, and now I want to delete this folder. I tried several ways to delete it, but I can only delete it locally, but not in my GitLab repository. This folder still exists, and I want to get rid of it. I tried these commands

git rm -r src   
git commit -m "Remove  directory"   
git push -u origin master

but it still does not delete the folder in my GitLab repository.

I also tried this:

git rm -r --cached src

and none of them seem to work for me.

+4
source share
1 answer

Git does not track directories, but only their contents. But git rm -r srchad to do it. Here you can check things out.

git push? , .

, origin - , git remote -v.

, , master.

, Gitlab -, , src. , , , -, , .

, , Gitlab .

WRT git rm --cached, --cached ( , ). , git add . .

+1

Source: https://habr.com/ru/post/1654370/


All Articles