When I run git status I have something like:
$ git status
# On branch assets
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: index.html
# new file: sections
# new file: sections/asset/asset.ctrl.js
# new file: sections/asset/asset.tpl.html
#
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: sections
The sections directory has existed since the project started, so not sure why it thinks it's a new file or needs to be deleted. When I try to commit I get:
You have both sections and sections/asset/asset.ctrl.js
error: Error building trees
Any ideas how I can commit my work?
I fix this error by
git rm -r --cached sections
git commit -m "blalblalba"
git add .
git commit -m "2blablalbla"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With