Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git can't commit Angular folder on my project with IntelliJ or SourceTree

I have a web app project with a folder with a PHP API REST and another folder containing Angular files. When I want to commit my files to BitBucket, I can commit all except the files under the Angular folder.

Same thing on SourceTree, I can't see any changes under this folder. Is there a thing Angular is doing on "ng new angular-app" to force this behaviour ? How can I fix this ?

enter image description here enter image description here

like image 796
Mattew Eon Avatar asked Dec 12 '17 08:12

Mattew Eon


1 Answers

With the help of Matt, I found how to solve my issue : As I couldn't see hidden files, I didn't see that Angular CLI created a .git folder in the angular app folder. I removed it, and now It's working.

For future apps, if we don't want Angular to initialize a git repo, we can specify it on the creation command like this : ng new --skip-git

like image 106
Mattew Eon Avatar answered Oct 02 '22 07:10

Mattew Eon