Answer the question
In order to leave comments, you need to log in
What is the correct way to deal with git submodule commits?
Separated part of the project into a submodule.
Made changes in the submodule and pushed to the submodule repository.
I started making changes in the submodule further, made a temporary local commit, which I am going to overwrite, only in order to switch to another branch of the main project . git status
shows no change.
I return to the root of the project - git status
it shows that the folder with the submodule has been changed (Changes to be committed) and duplicates below that the submodule has been changed (new commits) (Changes not staged for commit) .
In order to switch to another branch, do you need to make a commit in the project as well? And if you make a simple commit, will there be a message that says that there are new commits in the submodule (until you push)?
Tried git stash
it, it says No local changes to save
Do you always have to commit in the main project, along with a commit in a submodule? If yes, then it is clear why a separate branch is created in the tutorial..
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question