Search code examples
gitsmartgitatlassian-sourcetree

Where did my Git changes go?


I have committed changes to Git and pushed to origin. Another developer was having trouble merging. They did something and did a push. I saw an update and did a pull and half my changes were reverted! What happened? I'm guessing they had merge conflicts and used their version of the file but even so I can't find any history of my work in Git?

I'm using SourceTree and not quite comfortable with it yet. I've just installed Smart Git (more familiar with it) but not finding anything useful to discover what happened in either.


Solution

  • In SmartGit, open the Log and use Query|Load All Commits. This should give you your commits temporarily back, so you can add a branch to make them accessible again. After that either Merge, Rebase or Cherry-Pick your changes to master (assuming it's master you and your team is working on).