Git无法使用IntelliJ或SourceTree在我的项目上提交Angular文件夹(Git can't commit Angular folder on my project with

系统教程 行业动态 更新时间:2024-06-14 16:57:40
Git无法使用IntelliJ或SourceTree在我的项目上提交Angular文件夹(Git can't commit Angular folder on my project with IntelliJ or SourceTree)

我有一个Web应用程序项目,其中包含一个带有PHP API REST的文件夹和另一个包含Angular文件的文件夹。 当我想将我的文件提交到BitBucket时,我可以提交除Angular文件夹下的文件以外的所有文件。

在SourceTree上也是如此,我在这个文件夹下看不到任何变化。 Angular是否正在使用“ng new angular-app”强制执行这种行为? 我怎样才能解决这个问题 ?

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 ?

最满意答案

在Matt的帮助下,我找到了如何解决我的问题:由于我看不到隐藏的文件,我没有看到Angular CLI在angular app文件夹中创建了一个.git文件夹。 我删除了它,现在它正在工作。

对于未来的应用程序,如果我们不希望Angular初始化git repo,我们可以在创建命令中指定它,如下所示: ng new --skip-git

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

更多推荐

本文发布于:2023-04-13 12:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/5cbd643a7f07dba0c3330768682082f8.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   项目   SourceTree   IntelliJ   Git

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!