Ideally your .gitignore
should prevent the untracked (and ignored) files from being shown in status, added using git add
etc. So I would ask you to correct your .gitignore
You can do git add -u
so that it will stage the modified and deleted files.
You can also do git commit -a
to commit only the modified and deleted files.
Note that if you have Git of version before 2.0 and used git add .
, then you would need to use git add -u .
(See “Difference of “git add -A
” and “git add .
”“).
Related Posts:
- Handling file renames in Git
- Why are there two ways to unstage a file in Git?
- ‘git’ is not recognized as an internal or external command
- Ignoring directories in Git repositories on Windows
- ‘git’ is not recognized as an internal or external command
- Gitignore not working
- Gitignore not working
- How to revert multiple git commits?
- How to remove origin from git repository
- What’s the purpose of git-mv?
- git : Pull is not possible because you have unmerged files
- How to revert multiple git commits?
- Why git asks to enter a commit message to explain why this merge is necessary
- How do I remove version tracking from a project cloned from git?
- How do I remove version tracking from a project cloned from git?
- git pull on a different branch
- Git error on commit after merge – fatal: cannot do a partial commit during a merge
- git – Your branch is ahead of ‘origin/master’ by 1 commit
- How can I make Git “forget” about a file that was tracked, but is now in .gitignore?
- Download a specific tag with Git
- What are the differences between .gitignore and .gitkeep?
- How to add multiple files to Git at the same time
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How to create a .gitignore file
- Git push won’t do anything (everything up-to-date)
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- git – Your branch is ahead of ‘origin/master’ by 1 commit
- git add . -> still “nothing to commit” with new files
- git submodule add error: does not have a commit checked out
- How to add multiple files to Git at the same time
- Git error on git pull (unable to update local ref)
- git status shows modifications, git checkout —
doesn’t remove them - How to resolve git’s “not something we can merge” error
- How can I Remove .DS_Store files from a Git repository?
- How to clone all remote branches in Git
- Update Git branches from master
- How to squash all git commits into one?
- Updates were rejected because the remote contains work that you do not have locally
- How to interactively (visually) resolve conflicts in SourceTree / git
- git: How to ignore all present untracked files?
- How can I delete all of my Git stashes at once?
- What to gitignore from the .idea folder?git intellij-idea gitignore webstorm
- Remove node_modules from git in vscode
- What’s the use of the staging area in Git?
- git push –force-with-lease vs. –force
- How can I move a tag on a git branch to a different commit?
- Why is .gitignore not ignoring my files?
- Sourcetree adding files in global .gitignore, not in repository .gitignore
- How to edit gitignore file
- How can I push a specific commit to a remote, and not previous commits?
- What is .gitignore exactly?
- Different color admin bars for dev, staging and production
- How to run subversion and staging environments when running WordPress
- Theme/Plugin/Widget Data and Staging/Production Servers
- What firewall ports need to be open to allow access to external git repositories?
- How do I prevent apache from serving the .git directory?
- Git error: “Please make sure you have the correct access rights and the repository exists”
- What is a Memory Heap?
- 403 Forbidden vs 401 Unauthorized HTTP responses
- Advanced AREL or just Rails Query for has_many through search by association
- Undoing a git rebase
- How to resolve merge conflicts in a Git repository
- “If not” condition statement in python
- pagebreak in markdown while creating pdf
- 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?
- Time Complexity of Prims Algorithm?
- Pull request vs Merge request
- What is the difference between `git merge` and `git merge –no-ff`?
- What’s the difference between & and && in MATLAB?
- What is the definition of a “disparity map”?
- ! [rejected] master -> master (fetch first)
- Alternative to ui-grid(doesn’t support angular2/4)
- How to git add a whole folder
- Mongoose.js: remove collection or DB
- slideToggle JQuery right to left
- Valgrind Invalid free() / delete / delete[] / realloc() in C
- Exception in thread “main” java.lang.reflect.InvocationTargetException
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- Java: Not a statement
- Passing a hexadecimal value into a module in Verilog
- Difference between git stash pop and git stash apply
- Setup for WordPress + Plesk + Git + Local Environment
- How to: Easily Move a WordPress Install from Development to Production?
- Is Git/GitHub a good WordPress deployment solution?
- Migrate Changes from a Staging Site to Production
- Change management solution for BP-based site?
- Best practice differences in DB options and wp-config between live, staging and local WordPress environments?
- How can I trash multiple posts at once from the front end?
- Setup 3 Sites To Connect To 1 Database and Share Data
- Why Does Automattic use SVN for WordPress Instead of Git?
- Staging Sites: What to push through?
- Custom links in menus not working in multiple environments
- Where do I build my updated website?