on-internet
← Community

git add only modified changes and ignore untracked files

Stack Overflow ·

I ran "git status" and listed below are some files that were modified/or under the heading "changes not staged for commit". It also listed some untracked files that I want to ignore (I have a ".gitignore" file in these directories). I want to put the modified files in staging so I can commit them. When I ran "git add .", it added the modified files AND the files I want to ignore to staging. How do I add only the modified files and ignore the untracked files if presented with the git status below. Also, are my ".gitignore" files working properly? $ git status # On branch addLocation # Changes n

Comments

Sign in or sign up to comment and upvote.

No comments yet.