clean submodule
current
When clean: true, during Cleaning the repository, it will do:
git clean -ffdx
git reset --hard HEAD
want
When submodules: true or submodules: recursive, I want it also do:
git submodule foreach [--recursive] git clean -ffdx
git submodule foreach [--recursive] git reset --hard
why
I have a submodule in C++, I want to recompile it without cache everytime.
I was manually run git reset before make. But after I set submodule.xxx.update = rebase, it may (or may not) fail during Fetching submodules step.
The clean step must happend before submodule update in my case.
Hello,
Why is this still open? This is a big deal! It's not possible to have a reliable CI without the mean to clean the submodules when checking-out.
I ran into this issue recently. For me, a file in a submodule got modified by a previous run and then was present in the next run, causing issues.
It would be nice if this got merged so I can have reliable CI without adding hacks.
This was my workaround by the way:
- uses: actions/checkout@v3
with:
submodules: true
- name: Submodule cleanup fix # Bodge for https://github.com/actions/checkout/issues/358
run: |
git submodule foreach --recursive git clean -ffdx
git submodule foreach --recursive git reset --hard
I've also encountered this issue
@joshmgross @cory-miller you guys seem to be the only ones maintaining this repository even though it is an official Github action. Would you mind looking into this? There is even a PR ready.
I encountered this issue too
We have this issue as well, it affects people running self-hosted runners the most because i.e. a simple rename action to add -SNAPSHOT-1 to the build artifact outputs results in hundreds of files with increasingly long names, -SNAPSHOT-1-SNAPSHOT-2-SNAPSHOT-3 etc accumulating on the build server inside the submodule.
Thanks @OscarVanL for the quick and easy workaround to copy+paste.
Bump, this is really important.
The fact that GitHub, a git hosting service doesn't give a darn about their git checkout action working properly never stops being painfully ironic. It's been half a decade since this issue was opened, guess small indie company Microsoft can't spare anyone to look at it.
Bump