0

So I want to push my cpp codes on github without the .exe file generated.So in my .gitignore file I have added this command : *.exe.But it doesnt't seem to be working as exe files are still there in my code.I am using VSCode to push and track my changes.

Here is screenshot of my directory:

enter image description here

What seems to be the problem?

Xtense
  • 636
  • 4
  • 13

1 Answers1

0

You can execute the following commands to apply the changes in the .gitignore file:

git rm -rf --cached .
git add .
git commit -m "initial commit"
git push

This method removes all files from the repository to enforce ignore rules. Then, following the ignore rules, the files are scanned again and the files to be tracked/untracked are marked.


References
Sercan
  • 4,739
  • 3
  • 17
  • 36