Cannot push changes in angular project using visual studio github

Viewed 396

I'm trying to use github extension on visual studio, every c# file works fine, but when I make changes inside the project ClientApp those changes are not detected. When I first pulled to my master branch my angular project had that .git folder which could have caused the problem, but now, I cant add those files anymore.

Bellow, my github branch. Notice that my ClientApp folder is diferrent. enter image description here

How can I force my github to push my angular project to the main branch?

1 Answers

If you want ClientApp content to be pushed alongside the rest of your project files, you would need to:

git rm --cached ClientApp    # no trailing /
git commit -m "Delete gitlink"
git add ClientApp
git commit -m "Add ClientApp content"
git push

Meaning: removing the nested .git folder inside ClientApp was not enough.
You need to delete the gitlink (special entry in the index) which recorded the root tree SHA1 of the nested repo ClientApp.

Related