Pergunta

I have a team of a few people working on the same git repository, using the git flow method (master, develop, hotfixes, features, releases), and a remote bare repository.

We had a hotfix with a few commits that was merged successfully into master and all was good. Now, a week later, and a lot of changes later, after continuing to work on develop, we had a release branch that was not merged into master as well.

We noticed that some files in the system got reverted back to the state they were before the hotfix. These files were only touched lately in the hotfix mentioned, and no further changes were made on them in the develop branch.

The weird part is that I can't find a merge in the git log history that shows a conflict on any of these files, which can indicate that a team member got a conflict and didn't resolve it correctly.

All I can see are the commits from the hotfix which added the desired changes, but I can't find a later commit that reverts those changes.

I tried using git whatchanged -p -r -m -- myfile and again, all I see are the commits from the hotfix.

How can I find out what happened to those files? Could it be a corruption in my repository?

Foi útil?

Solução

git has a build in mechanism for that.

bisect: https://www.kernel.org/pub/software/scm/git/docs/git-bisect.html

run this build in tool and you will be able to track the problematic commit where your changes disappeared.

Read more here to understand how to use it and how it work. http://alblue.bandlem.com/2011/07/git-tip-of-week-git-bisect.html

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top