I'm pretty new to source control and source tree and I've just update a bunch of files that I'd like to revert. Now that pose the question, I'm wondering if I should rethink my workflow. I'm working on a Unity project. My working folder is my depot. I recently updated a number of files in my depot, but I haven't yet committed anything yet. I'd like to revert them to their original state to hopefully get my project working again.
I'm hoping that I can just discard those changes and everything will go back to where it was, but before I get myself in any deeper I thought I should ask.
Also - if anyone has any thoughts on workflow/best practices I'd appreciate any wisdom out there.
Discard will remove any uncommitted changes, which will restore the file to the same state as the most recent commit in the branch you have checked out. "Remove", on the other hand, will delete the file.
Be careful when getting rid of uncommitted changes. If you realize you discarded/removed something you wanted to keep that wasn't committed, Git cannot restore it for you.
If you're new to Git, you should checkout the Git book: https://git-scm.com/book/en/v2 Focus on Sections 1.1-1.4, then Chapters 2 and 3. All examples are command line, but having a basic understanding of the commands should make SourceTree pretty intuitive.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
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!
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