-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Untracked files after switching from submodule to directory #624
Comments
If a git submodule is converted to a regular git directory (e.g. when moving from dev -> rel-6 branch), the directory is not properly cleaned by the checkout action. Remove the git submodule .git files which makes sure that git properly reinitialize subdirectories, even if they have been a submodule before. See also: actions/checkout#624
If a git submodule is converted to a regular git directory (e.g. when moving from dev -> rel-6 branch), the directory is not properly cleaned by the checkout action. Remove the git submodule .git files which makes sure that git properly reinitialize subdirectories, even if they have been a submodule before. See also: actions/checkout#624
The work around removing the |
On a self-hosted runner, using
actions/checkout@v2
on a repository which uses a submodule in directoryx/
, subsequently doesn't remove that submodule when it gets converted to a directory.x/
actions/checkout@v2
, observe that the main repository and directoryx/
is correctly checked outx/
from repository, converting it to a regular "native" directory commited to the main repositoryactions/checkout@v2
. Directoryx/
still contains the submodule.git
seems not to cleanup/checkout the root repository folderx/
. The directory contains untracked files.The
clean
property is left default (which istrue
). It seems that git commands are not able to cleanup existing submodules in the working directory when moving from a branch with submodules to a branch without submodules.It seems that the
.git
file of the submodules make git to stop recursing into those directories and not checking them out. Removing.git
files of those removed submodules seems to help:This is particular annoying when moving from submodules to directory back and forth, e.g. when using the same runners for a stable branch and development branch.
The text was updated successfully, but these errors were encountered: