git - Why wont it let me commit my submodules? -
so did:
git submodule foreach git submodule foreach git pull origin master
and got huge out put pulled , updated these submodules latest , greatest. did:
vagrant@vagrantpress:/vagrant/freya-vagrant$ git status on branch master branch up-to-date 'origin/master'. changes not staged commit: (use "git add <file>..." update committed) (use "git checkout -- <file>..." discard changes in working directory) (commit or discard untracked or modified content in submodules) modified: local-dev/content/mu-plugins/freya-mu (modified content) modified: local-dev/content/themes/freya-theme (modified content) no changes added commit (use "git add" and/or "git commit -a") vagrant@vagrantpress:/vagrant/freya-vagrant$ git commit -a on branch master branch up-to-date 'origin/master'. changes not staged commit: modified: local-dev/content/mu-plugins/freya-mu (modified content) modified: local-dev/content/themes/freya-theme (modified content) no changes added commit vagrant@vagrantpress:/vagrant/freya-vagrant$ git add -a vagrant@vagrantpress:/vagrant/freya-vagrant$ git commit -a on branch master branch up-to-date 'origin/master'. changes not staged commit: modified: local-dev/content/mu-plugins/freya-mu (modified content) modified: local-dev/content/themes/freya-theme (modified content) no changes added commit vagrant@vagrantpress:/vagrant/freya-vagrant$
but can see wont commit them because apparently there no changes? don't understand this. what's going on here?
it's because changes in git submodule projects, rather root project.
following documentation @ https://git-scm.com/book/en/v2/git-tools-submodules, want like:
cd local-dev/content/mu-plugins/freya-mu git checkout master # or other branch git submodule update --remote --merge # make edits, e.g.: vi readme.md git commit -m "test" readme.md git submodule update --remote --rebase git push --recurse-submodules=check # follow output command
Comments
Post a Comment