git checkout fail because of new submodule
While on development branch I am trying to do:
git checkout master
And getting the message:
- How can I completely empty the master branch in Git?
- Merging commits from branch to master -> odd-looking tree
- How to get git to correctly merge moved content (not only files)
- How can I switch git branches when there is an untracked file error?
- How can i copy a file from local commit on a different branch?
- How to update a file across all branches in a Git repository
error: The following untracked working tree files would be overwritten
And it points me to a directory.
The problem is that I made this directory to be submodule. But its not a submodule in master, so it tells me that those files will be override and aborting the checkout.
What can I do?
One Solution collect form web for “git checkout fail because of new submodule”
Should you make new a branch as your submodule. For create new branch:
git checkout -b nameofyoubranchoryoursubmodule