It seems like you want the files ignored but they have already been commited. .gitignore has no effect on files that are already in the repo so they need to be removed with git rm --cached
. The --cached
will prevent it from having any effect on your working copy and it will just mark as removed the next time you commit. After the files are removed from the repo then the .gitignore will prevent them from being added again.
But you have another problem with your .gitignore, you are excessively using wildcards and its causing it to match less than you expect it to. Instead lets change the .gitignore and try this.
.bundle .DS_Store db/*.sqlite3 log/*.log tmp/ public/system/images/ public/system/avatars/
Related Posts:
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- What is the best (and safest) way to merge a Git branch into master?
- Undo a Git merge that hasn’t been pushed yet
- Git merge hotfix branch into feature branch
- Abort a Git Merge
- How to resolve merge conflicts in a Git repository
- Ignoring directories in Git repositories on Windows
- Gitignore not working
- How can I merge multiple commits onto another branch as a single squashed commit?
- Gitignore not working
- How can I merge multiple commits onto another branch as a single squashed commit?
- The following untracked working tree files would be overwritten by merge, but I don’t care
- The following untracked working tree files would be overwritten by merge, but I don’t care
- Git error on commit after merge – fatal: cannot do a partial commit during a merge
- Is there a “theirs” version of “git merge -s ours”?
- How can I make Git “forget” about a file that was tracked, but is now in .gitignore?
- What are the differences between .gitignore and .gitkeep?
- How to create a .gitignore file
- The following untracked working tree files would be overwritten by merge, but I don’t care
- Is there a “theirs” version of “git merge -s ours”?
- git: How to ignore all present untracked files?
- What to gitignore from the .idea folder?git intellij-idea gitignore webstorm
- Is it possible to pull just one file in Git?
- How to resolve git status “Unmerged paths:”?
- How to keep a branch synchronized/updated with master?
- Resolve Git merge conflicts in favor of their changes during a pull
- Found a swap file by the name
- Is there a git-merge –dry-run option?
- Git pull – Please move or remove them before you can merge
- Why is .gitignore not ignoring my files?
- Sourcetree adding files in global .gitignore, not in repository .gitignore
- How do I use ‘git reset –hard HEAD’ to revert to a previous commit? [duplicate]
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- error: src refspec master does not match any
- How to cherry pick from 1 branch to another
- How to Git stash pop specific stash in 1.8.3?
- How do I revert a Git repository to a previous commit?
- How to merge branch to master?
- What happens when I do git pull origin master in the develop branch?
- What is the `git restore` command and what is the difference between `git restore` and `git reset`?
- Git fetch remote branch
- Practical uses of git reset –soft?
- Git error: “Please make sure you have the correct access rights and the repository exists”
- Undoing a git rebase
- How do I pull my project from github?
- Difference between Git and GitHub
- Could not open a connection to your authentication agent
- How do I resolve git saying “Commit your changes or stash them before you can merge”?
- Hard reset of a single file
- Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch
- Why do I have to “git push –set-upstream origin
“? - How do you create a remote Git branch?
- Move the most recent commit(s) to a new branch with Git
- rejected master -> master (non-fast-forward)
- How to name and retrieve a stash by name in git?
- Create a tag in a GitHub repository
- How can I delete a file from a Git repository?
- Git: Could not resolve host github.com error while cloning remote repository in git
- Make an existing Git branch track a remote branch?
- How to fully delete a git repository created with init?
- Undo git pull, how to bring repos to old state
- How do you create a remote Git branch?
- How do I update or sync a forked repository on GitHub?
- How can I reset or revert a file to a specific revision?
- Files not updating using ‘git pull’
- Pull request vs Merge request
- What is the difference between `git merge` and `git merge –no-ff`?
- error: cannot lock ref.. ‘refs/tags’ exists; cannot create ‘refs/tags/
- git checkout tag, git pull fails in branch
- How can I copy the content of a branch to a new local branch?
- Git: “please tell me who you are” error
- Git nothing added to commit but untracked files present – even with those files added to gitignore
- How to change folder with git bash?
- Git:nothing added to commit but untracked files present
- How to commit changes to another pre-existent branch
- “git checkout
” is changing branch to “no branch” - Your branch is ahead of ‘origin/master’ by 3 commits
- git add only modified changes and ignore untracked files
- How can I generate a Git patch for a specific commit?
- How do I list all of the files in a commit?
- Git keeps prompting me for a password
- How can I unstage my files again after making a local commit?
- Git stash pop- needs merge, unable to refresh index
- Git – Remove commit from history
- List submodules in a Git repository
- How can I reconcile detached HEAD with master/origin?
- How do you merge two Git repositories?
- How do I run git log to see changes only for a specific branch?
- How to get Git to clone into current directory
- How to search in commit messages using command line?
- How to get changes from another branch
- key_load_public: invalid format
- Difference between git stash pop and git stash apply
- git fetch doesn’t update my local repository
- How do I show the changes which have been staged?
- Git push hangs when pushing to Github?
- GIT and Development URL’s point to production
- Could not find wp-load.php issue
- SSH git — How to pull a folder from repo, but not delete other directories & files on deployment server [closed]
- Best workflow for Git theme development with plugins [closed]