Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Using SourceTree and Git, I did a pull while I had local changes I'd made in Sublime that were not committed. I thought that the changes would merge down into my local version, but mine appears to have been wiped out.
How do I get it back?
The changes you pulled got auto-merged into the files in your working copy. Your changes and the pulled changes should both be there in the files. (If there is any kind of conflict, pull fails and tells you to commit first.)
(All this above is only true if you are using an up-to-date version of Git. If not and your changes are gone, they are gone and there is no way of getting them back.)
Could this be a factor: The file was new to the repository. Essentially, I took layout.css and made a new file called layout.less, because we're adopting LESS for managing their styles. I also emailed the layout.less to the client. He added it to the Git repository. I continued making changes on my local version. Then, when I did the update, it did NOT warn me the way I expected, it simply wiped out my local, newer version. Could this be because my local version was a non-entity, as far as Sourcetree/Git was concerned? In other words, I had never directly added it to Git, but I had it in that directory. The client added it to Git in the same directory. When I did the pull, as far as Git was concerned my local machine didn't HAVE a copy, officially. So it overwrote mine?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, probably something like this happened. Anyway, next time, either stash or commit all your changes before pulling/merging... You might want to take a look at your recycle bin, perhaps it has the deleted file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.