That's not why this happens. It happens because you're adding those files in the first place. Why are files you don't want to push even being tracked? git add is meant to be a targeted operation, performed only on those files you want in the repo. Don't git add * or (worse) git add -A and you won't have this problem.
Thank you for sharing about git add command. Like I said in this comment, I use the GitHub Desktop app to commit and push my changes to the remote repo. Since It automatically adds all new files to the tracking list, The issue of committing unwanted files occurs when I'm not vigilant enough 😐.
(I love .gitignore for its ability to hide things from the "Untracked Files" list in git status. Because if you're not planning on tracking those files, get them off the list so that git can warn you if you haven't added any that you SHOULD be tracking.)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's not why this happens. It happens because you're adding those files in the first place. Why are files you don't want to push even being tracked?
git add
is meant to be a targeted operation, performed only on those files you want in the repo. Don'tgit add *
or (worse)git add -A
and you won't have this problem.Thank you for sharing about
git add
command. Like I said in this comment, I use the GitHub Desktop app to commit and push my changes to the remote repo. Since It automatically adds all new files to the tracking list, The issue of committing unwanted files occurs when I'm not vigilant enough 😐.(I love
.gitignore
for its ability to hide things from the "Untracked Files" list ingit status
. Because if you're not planning on tracking those files, get them off the list so that git can warn you if you haven't added any that you SHOULD be tracking.)