What is the difference between Stop Tracking and Discard File in git SourceTree

The one detail not covered by the first answer is that Stop Tracking does not delete the local file. It only removes it from source control.

  1. If you want to keep the file locally (maybe it’s a .suo file storing
    Visual Studio settings that you decide shouldn’t have been in source
    control) but remove it from the repository, you should use Stop Tracking. After this, if you see the file listed in Unstaged files, you can use right-click > Ignore… in SourceTree to update your .gitignore file to ignore the file in future.
  2. If you want to delete your file both locally and in the repository,
    you should use Remove. (to use the SourceTree term)
  3. Finally, if you only want to revert your local changes without
    changing the repository at all, use Discard.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)