Most of the other answers are 2/3 years old.
2019 Update:
# remove extension less files
*
!/**/
!*.*
# intermediate files
node_modules/
build/
obj/
Debug/
bin/
package-lock.json
.vs
.gradle
.idea
*.exe
# res
**/resources/signing
# project specific
**/dist/
**/all.min.js
# ========== Cordova - platforms
# android
# platforms/android/app/src/main/assets
# platforms/android/app/src/main/AndroidManifest.xml
# platforms/android/app/src/main/res/drawable-*
# platforms/android/app/src/main/res/mipmap-*
# platforms/android/app/src/main/res/xml/config.xml
# browser
# platforms/browser/app/src/main/assets
# platforms/browser/config.xml
# platforms/browser/www
#
# ========== Cordova - plugins - remove all except json & xml
# plugins/**/.DS_Store
# plugins/**/*.cs
# plugins/**/*.h
# plugins/**/*.java
# plugins/**/*.js
# plugins/**/*.m
# plugins/**/*.map
# plugins/**/*.md
# plugins/**/*.modulemap
# plugins/**/*.ts
# plugins/**/LICENSE
# plugins/**/NOTICE
# plugins/**/*.gradle
# plugins/**/tests/
As you can see I commented most of the lines ( all lines starting with # ).
This is because I ran into issues with plugin version changes, and decided to know what is happening with plugin updates.
Essentially all platform & plugin files are included in commit, now my life is peaceful.
2019:
I stated with this.
After developing & publishing the app, it became below:
(If you deviate from below, comment below, we can learn from each other)
# remove extension less files
*
!/**/
!*.*
# intermediate files
node_modules/
build/
obj/
Debug/
bin/
package-lock.json
.vs
.gradle
.idea
*.exe
# Cordova - platforms
platforms
# Cordova - plugins - remove all except json & xml
plugins/**/.DS_Store
plugins/**/*.cs
plugins/**/*.h
plugins/**/*.java
plugins/**/*.js
plugins/**/*.m
plugins/**/*.map
plugins/**/*.md
plugins/**/*.modulemap
plugins/**/*.ts
plugins/**/LICENSE
plugins/**/NOTICE
plugins/**/*.gradle
plugins/**/tests/
# res
**/resources/signing
# project specific
**/dist/
**/all.min.js