
This is a quick post just for anyone who’s looking for a .gitignore file to add to their NativeScript projects that they version using Git.
At this point, none of the NativeScript out of the box templates generate a .gitignore file. This may be because not everyone uses Git and not everyone has the same preferences. So here are my preferences for those that may be searching for a starting point. Note: I use TypeScript with for NativeScript, so you’ll see that JavaScript files are ignored. If you are using plain old JavaScript, then you’ll have to omit that line.
Here is the file
Please submit any useful settings you may have in the comments below, or tweet at me @digitalix
Enjoy!
3 Comments
January 4, 2018 Sam
Why would you ignore your JavaScript files?
You'll be changing those as you develop / push features.
Isn't that why you use git for version control in the first place.
January 4, 2018 Alexander Ziskind
Very good point, Sam. I didn't mention that I use TypeScript - article updated.
February 21, 2018 Mike Brady
Lol! That caught me out several times looking at peoples' Git ignore files. Couldn't figure why they were leaving .js out. Thanks for the clarity. Will use this one (without the *.js)
Leave your comment