0

When working on my Cordova project, I didnt have a .gitignore file, so when i committed everything (by way of git add *, it seemed to commit all my platforms, .idea, and plugins.

So, this is now pushed to GIT, but I wanted to dereference them, so they arent downloaded in the future.

I just created a new Cordova .gitignore as follows.

#Cordova Info
platforms/
plugins/

# ANDROID / ECLIPSE

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files - android project subfolder
Android/bin/
Android/gen/
Android/assets/

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# IOS / Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
IOS/www/

# OSX
.DS_Store

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

I ended up grabbing the "PhoneGap GitIgnore" and added platforms and plugins to it at the top.

So it comes down to 'how do i unlink the platforms and plugins folders and is this a solid gitignore for Cordova 6.3.0' ?

Fallenreaper
  • 10,222
  • 12
  • 66
  • 129

1 Answers1

0

For file:

git rm yourFile

For dir:

git rm -R yourDir
Kacper Polak
  • 1,411
  • 15
  • 24
  • By chance, do you also happen to have a decent gitignore file for Cordova? I was looking online and wasnt sure what a good design was – Fallenreaper Sep 26 '16 at 13:52