Ask coding questions

← Back to all posts
Exclude files from upload to GitHub
NicoCaldo (0)

The GitHub push integration is very simple and works very fine for me but, I would like to know if there was the chance to exclude some files to be pushed instead of pushing them all every time as, on some projects, I have files that are "samples" for testing the app

Answered by RoBlockHead (520) [earned 5 cycles]
View Answer
Comments
hotnewtop
RoBlockHead (520)

I think you're looking for the .gitignore file! Basically, you put the paths of the files you want to ignore on individual lines like so:

/node_modules
/build
/samples
*.exe
ignoreMe.js

there's more detail on the link above, but that's the basic gist of it.