Linked Questions
26 questions linked to/from How do I remove a directory from a Git repository?
6 votes
1 answer
89k views
How to delete one folder from git repo? [duplicate]
I have a folder called "Serverside Project" that I want to delete from my git repo online. I can't seem to be able to get rid of it! How do I remove it?
-3 votes
1 answer
319 views
How to delete folders from GIT? [duplicate]
I need to remove 2 folders in BitBucket: I used command: git rm folder1 folder2 And got error: Fatal: not removing "folder1" recursively without -r
0 votes
0 answers
50 views
Gitlab folder structure not updating after push [duplicate]
Inside my React project I've renamed the folder from "Components" to "components" and worked fine locally to solve an import/export issue. After I've pushed it to Gitlab it shows ...
4056 votes
16 answers
1.3m views
Remove a file from a Git repository without deleting it from the local filesystem
I want to remove a file from my repository. git rm file_to_remove.txt will remove the file from the repository, but it will also remove the file from the local file system. How do I remove this file ...
885 votes
10 answers
401k views
Remove directory from remote repository after adding them to .gitignore
I committed and pushed some directory to github. After that, I altered the .gitignore file adding a directory that should be ignored. Everything works fine, but the (now ignored) directory stays on ...
767 votes
9 answers
533k views
Remove a folder from git tracking
I need to exclude a folder (name uploads) from tracking. I tried to run git rm -r --cached wordpress/wp-content/uploads and after that I added the path to .gitignore /wordpress/wp-content/uploads ...
13 votes
2 answers
10k views
Why is applicationhost.config still being added to source control even thought it's in gitignore
First of all, I've seen .vs\config\applicationhost.config in source control. We are working in a team and Visual Studio changes some path inside applicationhost.config file. We need to exclude this. ...
1 vote
2 answers
13k views
Delete deleted files/folder when updating a git repo
I created a git repo and commited files/folder, after some time a deleted a folder from my local git folder and in try to update the repo I run the commands - git add . git commit -m "second commit" ...
7 votes
3 answers
25k views
How do you delete a folder with files in it in Git Bash?
What command do I use to delete a folder and all contents in it using Git Bash?
5 votes
4 answers
3k views
git case-insensitive directory renamed
Looking to fix an issue where I now have 2 directory paths with the same name just differs in capitalization. Because, I renamed the directory to lowercase, once upon a time. I see only one folder/...
1 vote
2 answers
4k views
cannot add folder to gitignore file [duplicate]
My .gitignore file is the following: $ cat .gitignore Index/ Index/LOG I added .gitignore file to repo, commit and even push. But git status permanently shows: # On branch master # Changes not ...
2 votes
2 answers
6k views
How to ignore folder in GitHub correctly?
In my .gitignore file I added a path to folder I don't want to see in GitHub website: Results/.ipynb_checkpoints/ Then I push this changes: git commit -a -m "add ignore" git push origin master But ...
5 votes
3 answers
2k views
Error: Cannot find module './drivers' with mongoose only on the server
mongoose works fine on the computer but on the server I get this error: Error: Cannot find module './drivers' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (...
1 vote
2 answers
1k views
How to remove a renamed folder from github
I had a folder on github, say folder which I renamed to folder1 a few commits ago. I now see that both folder and folder1 show up in my repository. How can I remove the old folder. I have tried git rm ...
0 votes
2 answers
4k views
Remove a folder from Bitbucket
I'm trying to remove a folder from Bitbucket. I tried the following commands, but they aren't working: $ rm -r folderName $ git push