I have an Angular project where I'd like to push only some files into my remote repo via Git. Modifying .gitignore and using the .git/info/exclude didn't work. I'm sure it stopped Git from detecting changes in those places, but these files still got pushed to the remote repo even after creating and pushing a new branch.
How can I exclude, for example, my entire e2e folder from being pushed to the remote repo? node_modules already behaves this way, as it only exists on my local and wont get comitted to the remote. How do I do that for other files and folders?
 
    