I merged two branches. Now when I try to git add ., a folder simply is ignored by the command. So then I run 'git status' this is displayed in red - 'modified: admin'.
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working d
# (commit or discard the untracked or modified content in submodul
#
# modified: admin (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
How do I commit the changes to admin?
admin is not a fileThis message:
# modified: admin (modified content)
indicates that admin is a submodule.
It's a submodule in a dirty state - there are uncommitted changes within it. From the main repository there are no changes to commit, as the submodule's repository hasn't been changed, hence nothing happens if you try to commit with this scenario you do however recieve a warning that the submodule contains "modified content".
The submodule needs to be updated for the main repository to be able to reference those changes i.e.:
cd admin
git commit -va
# review and then commit the changes
git push # important if you want to be able to access this change elsewhere
cd ..
git add admin
git commit admin -m "bumping admin submodule"
If the submodule is not your own code it's very likely this is not what you want to do - in which case please explain (by editing the question) the objective i.e. the purpose of making changes in a dependency.
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