What does discard local changes mean?

I often see this option "Discard local changes?"

Precisely, what does this do? Does this delete files in the .gitignore list?

1 answer

Hi there,

Discard local changes will literally discard the changes you've made to the file since your last commit or pull, so make sure you use it carefully! Although I'm not sure where you're seeing this option, the diff view offers the "Discard" button. The option is typically called either 'revert' or 'reset' depending on DVCS you're using.

Cheers

You will see this in SourceTree 2.7.6 (Mercurial) for Mac when you have Uncommitted Changes in the tree, and then DoubleClick on the last Commit. If you check the "Discard Local Changes" in the ensuing dialog, you will be returned to the last Commit with no Uncommitted Changes, so all your changes since the last Commit are gone. Very convenient when you decide all the work you did since the last Commit should be trashed.

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...

706 views 3 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