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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

800 views 0 4
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