Working Copy Discard does not discard unstaged submodule changes

Given a simple Git setup with at least 1 submodule repository, make a change within the submodule. Now, you want to update your current branch to the latest but it will fail due to unstaged changes in the submodule. Discarding Working Copy changes will succeed but it will not discard unstaged changes within the submodule.

Fixing this problem requires the user to have to realise the unstaged changes within the submodule, specifically access it, discard the changes, then go back to the parent branch and finally perform a Pull.

Would be great if we could simply this process a bit to have Working Copy->Discard properly discard all unstaged changes in children submodules.

2 answers

Is this for Mac or Windows?

Windows v1.0.8.0.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,110 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you