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
0 votes
2 answers
3k views
Ignoring a folder when pushing to git
I am trying to push changes to my repository: -My Folder --Chapter 1 --Chapter 2 --Chapter 10 --my_new_file.py I added new folder Data a long with changing the code in my_new_file.py: -My ...
2 votes
1 answer
2k views
Remove folder from git repository/history
I accidentally commited/pushed large folders to github and am unable to push further. When trying to commit and push I receive the following message. "batch response: This repository is over its ...
0 votes
2 answers
506 views
How to remove a folder from Github repository?
I followed the steps given as answer to the following question: How to remove a directory from git repository? However when I execute (last command out of 3) git push origin master I get the ...
1 vote
0 answers
330 views
Git does not delete folders after merge
Suppose I have a repository with branches A and B, stemming from the same origin. I switch to the A branch and delete some directories. Those directories contain some files. Then I do commit and ...
0 votes
1 answer
381 views
How to push changes to Github after deleting a folder
I have 3 files, and one of them is a .idea file. I accidentally pushed this file to Github, and now I want to delete it, so I did git rm -r --cached .idea according to this post to remove it from git, ...
1 vote
2 answers
129 views
GIT and ignore existing data
I have a git repository on my NAS. I use from Windows and Linux SmartGit/Hg for interface with it. I had to took some old repository make in TFS and convert into GIT one, so far so good (difficult ...
0 votes
1 answer
340 views
Which files are to be saved GitHub for an Android Project?
1.I am new to GitHub & working on an Android project. My question is, which files are to be saved/which not on GitHub for an Android project (Eclipse)? 2.How to delete that folder from Github ...
-1 votes
2 answers
61 views
Remove git repo
Accidentally I've created some files in /dev/projectname/projectname I've initiated git repo git remote add origin git@bitbucket... then i did this from /dev: mv projectname projectname_d mv ...
0 votes
1 answer
93 views
Xcode Remove unit tests from Github
I'm tying to remove unit tests from Github in Xcode . I removed unit tests and commit and push but the unit tests folder in Github still there , Now i know that unit tests is important but it's ...
0 votes
1 answer
89 views
Remove files inside directory instead of the whole directory
I have 2 directories in my repo, and I am trying to delete one of them, let's call it TestA, which contains a folder, and inside it contains a doc. It will be: TestA >>> subTestA >>> TestDoc When I ...
1 vote
1 answer
71 views
Remove folder from a git repo not working - repo size issue
I am trying to remove a folder from my git repo . reason being I am getting space issue error remote: repository is in read only mode (over 2 GB size limit). ! [remote rejected] master -> master (...