Can't synchronizing the submodule after modify the file of the submodule in last pipeline.

Summary

Can't synchronizing the submodule after modify the file of the submodule in last pipeline.

Steps to reproduce

  1. First pipeline change the file in the submodule.
  2. Second pipeline will be failed, because can't synchronize the submodule.

Actual behavior

Unable to checkout the submodule

Expected behavior

Revert all modified files of the submodule before run the before_script.

Relevant logs and/or screenshots

Running with gitlab-ci-multi-runner 9.1.1 (6104325)
  on test@test (aaaaaaaa)
Using Shell executor...
Running on test-test...
Fetching changes...
HEAD is now at addd282 test
Checking out addd2823 as staging...
Updating/initializing submodules recursively...
Synchronizing submodule url for 'Submodule01'
error: Your local changes to the following files would be overwritten by checkout:
	Submodule01.h
Please commit your changes or stash them before you switch branches.
Aborting
Unable to checkout 'aaaaaaaaaa55b0cb398cc5efbd3e29aaaaaaaaaa' in submodule path 'Submodule01'
ERROR: Job failed: exit status 1

Environment description

Run in shell of windows 10

Used GitLab Runner version

Version:      9.1.1
Git revision: 6104325
Git branch:   9-1-stable
GO version:   go1.7.5
Built:        Tue, 02 May 2017 10:44:53 +0000
OS/Arch:      windows/amd64