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

前端 未结 2 1342
一向
一向 2021-02-03 21:06

I wanted to know what the difference is between discarding a file and and stop tracking a file in git using source-tree. If I deleted a file in my updated code and I want that f

2条回答
  •  天涯浪人
    2021-02-03 21:22

    In SourceTree, selecting "discard" on a file just throws away your local changes; stop tracking removes it from the repository. However, as long as you have deleted the file on your local drive, and you can see that deletion in the "Staged Files" section of SourceTree, it will be deleted in the repository as well when you commit.

提交回复
热议问题