Where did my git changes go?

I made changes to Git and clicked on start. Another developer has a merge problem. They did something and made a push. I saw the update and tried, and half of my changes were canceled! What happened? I assume they had merge conflicts and used their version of the file, but can't even find any history of my work in Git?

I use SourceTree, but not quite sure yet. I just installed Smart Git (more familiar with it), but did not find anything useful to find out what happened in both.

+4
source share
2 answers

In SmartGit, open the log and use Query | Load All Commits . This should temporarily return your commits to you so that you can add a branch to make them available again. After that, either Merge, Rebase, or Cherry - select your changes in master (assuming that you and your team work as master ).

+3
source

If you can use the command line, git log should show you all the commits.

If you have already pulled out locally, you can use reflog to relax what happened. http://www.kernel.org/pub/software/scm/git/docs/git-reflog.html

Then you can relax, if necessary, and go to a branch or cherry tree in a new branch.

Or you can return the merge. http://git-scm.com/2010/03/02/undoing-merges.html

+2
source

Source: https://habr.com/ru/post/1440379/


All Articles