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 check out a remote Git branch?
- What does ‘–set-upstream’ do?
- What does ‘–set-upstream’ do?
- How to use Git Revert
- How do I properly force a Git push?
- How to remove local (untracked) files from the current Git working tree
- Git submodule update
- What does ‘git merge –abort is equivalent to git reset –merge when MERGE_HEAD is present.’ of Git merge man page mean?
- How to modify existing, unpushed commit messages?
- Git pushing to remote branch
- How to revert a merge commit that’s already pushed to remote branch?
- GitHub Error Message – Permission denied (publickey)
- How do I push a new local branch to a remote Git repository and track it too?
- How do you push a tag to a remote repository using Git?
- How to solve SSL certificate: self signed certificate when cloning repo from github?
- How do I revert a Git repository to a previous commit?
- How do I resolve git saying “Commit your changes or stash them before you can merge”?
- How to revert multiple git commits?
- How do I rename both a Git local and remote branch name?
- How do I fix a Git detached head?
- How to cherry-pick multiple commits
- Undo git pull, how to bring repos to old state
- Another git process seems to be running in this repository
- rejected master -> master (non-fast-forward)
- merge one local branch into another local branch
- How to get the current branch name in Git?
- Can I share my private GitHub repository by link?
- How to rename a directory/folder on GitHub website?
- Create a git patch from the uncommitted changes in the current working directory
- git push says “everything up-to-date” even though I have local changes
- Download a single folder or directory from a GitHub repo
- Is there a “git touch” so I can push the same file with a new timestamp?
- Branch from a previous commit using Git
- Throw away local commits in Git
- Hard reset of a single file
- Hard reset of a single file
- How to remove remote origin from a Git repository
- Not a valid object name: ‘master’
- git add remote branch
- Undo a git stash
- Undo git stash pop that results in merge conflict
- Git: cannot checkout branch – error: pathspec ‘…’ did not match any file(s) known to git
- Set up git to pull and push all branches
- Invalid VCS root mapping – 3 errors on my project
- Unity Collaborate vs GitHub
- SourceTree keeps asking for Github password
- Git’s local repository and remote repository — confusing concepts
- How to change the license for a project at Github?
- Git add all files modified, deleted, and untracked?
- How to switch back to ‘master’ with git?
- Github Authentication Failed – … GitHub does not provide shell access
- How do I pull files from remote without overwriting local files?
- How can I see which Git branches are tracking which remote / upstream branch?
- Your repository has no remotes configured to push to
- Uninitialize git repository
- Specify an SSH key for git push for a given domain
- How do I “un-revert” a reverted Git commit?
- How to create a local branch from an existing remote branch?
- git push not send changes to remote git repository
- How to merge a specific commit in Git
- What is the .git folder?
- How to use Git and Dropbox together?
- Git: Where exactly is the “working directory”?
- What exactly does the “u” do? “git push -u origin master” vs “git push origin master”
- What is the usual process of saving changes made at the CMS level into source control?
- Add latest commit info on login footer using login_footer hook
- WordPress Core files not being ignored by Git
- Display GitLab repositories of the logged in user on a page
- How to retrieve the last modification date of all files in a Git repository